/srv/irclogs.ubuntu.com/2009/02/17/#upstart.txt

hettarAnyone around to awnser a quick question ?10:20
mbieblhettar: just ask10:22
hettarI have a daemon that I start/stop using upstart (kubuntu) which when you stop it needs to turn of some hardware. However upstart seems to just kill it.10:23
hettarI have sig handlers etc, but they aren't getting called.10:24
hettaris there some special way of performing a clean exit when being managed by upstart ?10:24
hettarOr have I just made a spectaular screwup in my code :)10:31
mbieblhettar: Well, does it work if you send SIGKILL manually to your process?10:37
hettaryeah10:39
hettarIf I do it all from old style init.d scripts it works fine.10:39
mbieblhettar: best ask Keybuk10:41
hettark thanks.10:42
hettarI'm currently adding some logging messages so I can see what is happing abit better. Hopefully that will give some clues too.10:43
mbieblKeybuk: are you seriously interested in how to get your Git branch to a remote host or is this just a little bit of ranting?14:11
mbieblIf the former, I can give one or two tips14:11
mbieblhow to do it14:11
Keybukmbiebl: I know how to do it14:17
Keybukmy rant is that it takes 9 commands, including editing things inside the .git repo14:17
mbieblok ;-)14:20
mbieblI only need three commands, but sure, it could be improved14:21
Keybukit seems to depend how complex your repo is14:22
sadmac2Keybuk: rsync15:28
sadmac2Keybuk: question: why nih_config? why not just use bison?17:25
Keybuka reasonable question17:27
sadmac2is it just something you haven't much looked at? I'd be willing to redo the upstart conf stuff as bison if you wanted to compare the two.17:29
Keybukexactly17:33
sadmac2I'll give it a shot at some point during the week.17:34
sadmac2Keybuk: also I have a patch to libnih that makes NIH_MUST and NIH_ZERO return the values they succeed on, so you can do foo = NIH_MUST (bar()) instead of NIH_MUST (foo = bar())17:34
sadmac2it uses that ({...}) gcc extension.17:35
mbieblsadmac2: does bison nowadays generate code which compiles without warnings?17:37
Keybukinteresting17:38
Keybukthat'd be nice17:38
sadmac2mbiebl: I believe so...17:38
mbieblMy last experience with flex/bison is 3 or 4 year old17:39
mbieblso...17:39
sadmac2Keybuk: I also have, in a similar vein, an NIH_MEM_MUST that does the spin-on-ENOMEM-fail-on-other-error pattern that has cropped up in a lot of places (seemingly since the new allocator went in)17:39
Keybukthere's one of those already17:40
KeybukNIH_SHOULD I think :p17:40
Keybukit's just in nih/error.h instead17:40
sadmac2Keybuk: I kept finding the same damn 8-line while loop to do it, so I macro'd it.17:40
Keybukreally?17:41
Keybukcan you find an example of that particular while loop?17:41
KeybukI thought I got rid of them all ages ago17:41
Keybuk#define NIH_SHOULD(_e)                                            \17:41
Keybuk        while (! (_e)) {                                          \17:41
Keybuk                NihError *_nih_should_err;                        \17:41
Keybuk                                                                  \17:41
Keybuk                _nih_should_err = nih_error_get ();               \17:41
Keybuk                if (_nih_should_err->number == ENOMEM) {          \17:41
Keybuk                        nih_free (_nih_should_err);               \17:41
Keybuk                } else {                                          \17:41
Keybuk                        nih_error_raise_again (_nih_should_err);  \17:41
Keybuk                        break;                                    \17:41
Keybuk                }                                                 \17:41
Keybuk        }17:41
sadmac2Keybuk: it was somewhere in event_operator.c I think17:41
sadmac2yep, that was the exact macro.17:42
sadmac2I did the version that returns a value. I'll put it where it goes.17:42
Keybukthat's kinda nice17:44
Keybuke = NIH_MUST (nih_new (NULL, foo));17:44
Keybukrather than17:44
KeybukNIH_MUST (e = nih_new (NULL, foo));17:44
Keybuke = NIH_SHOULD (some_call ());17:44
Keybukif (! e) {17:44
Keybuk  /* any error except ENOMEM */17:45
Keybuk}17:45
Keybukyes17:45
sadmac2I'll fix it up and mail it in when I get home tonight.17:45
mbieblMd: hi19:35
mbieblso, what are your plans regarding udev, now that lenny is out19:35
Mdmbiebl: solve a few work-related issues and then start working again on udev/m-i-t/pppd. hopefully I should be ready in a couple of weeks20:05
mbieblMd: please keep me posted on the progress20:07
Mdare you insterested in helping?20:07
mbieblHave you decided about the /lib/udev/rules.d vs /etc/udev/rules.d issue?20:08
MdI see no compelling reasons to diverge from upstream20:08
mbieblMd: I'm asking, because it will probably take some time to migrate all dependend packages over to the new location.20:09
mbieblThe the sooner in the squeeze cycle, the better.20:09
Mdnot a big deal, they will not break anyway20:09
mbieblsure20:11

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!