hettar | Anyone around to awnser a quick question ? | 10:20 |
---|---|---|
mbiebl | hettar: just ask | 10:22 |
hettar | I 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 |
hettar | I have sig handlers etc, but they aren't getting called. | 10:24 |
hettar | is there some special way of performing a clean exit when being managed by upstart ? | 10:24 |
hettar | Or have I just made a spectaular screwup in my code :) | 10:31 |
mbiebl | hettar: Well, does it work if you send SIGKILL manually to your process? | 10:37 |
hettar | yeah | 10:39 |
hettar | If I do it all from old style init.d scripts it works fine. | 10:39 |
mbiebl | hettar: best ask Keybuk | 10:41 |
hettar | k thanks. | 10:42 |
hettar | I'm currently adding some logging messages so I can see what is happing abit better. Hopefully that will give some clues too. | 10:43 |
mbiebl | Keybuk: 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 |
mbiebl | If the former, I can give one or two tips | 14:11 |
mbiebl | how to do it | 14:11 |
Keybuk | mbiebl: I know how to do it | 14:17 |
Keybuk | my rant is that it takes 9 commands, including editing things inside the .git repo | 14:17 |
mbiebl | ok ;-) | 14:20 |
mbiebl | I only need three commands, but sure, it could be improved | 14:21 |
Keybuk | it seems to depend how complex your repo is | 14:22 |
sadmac2 | Keybuk: rsync | 15:28 |
sadmac2 | Keybuk: question: why nih_config? why not just use bison? | 17:25 |
Keybuk | a reasonable question | 17:27 |
sadmac2 | is 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 |
Keybuk | exactly | 17:33 |
sadmac2 | I'll give it a shot at some point during the week. | 17:34 |
sadmac2 | Keybuk: 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 |
sadmac2 | it uses that ({...}) gcc extension. | 17:35 |
mbiebl | sadmac2: does bison nowadays generate code which compiles without warnings? | 17:37 |
Keybuk | interesting | 17:38 |
Keybuk | that'd be nice | 17:38 |
sadmac2 | mbiebl: I believe so... | 17:38 |
mbiebl | My last experience with flex/bison is 3 or 4 year old | 17:39 |
mbiebl | so... | 17:39 |
sadmac2 | Keybuk: 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 |
Keybuk | there's one of those already | 17:40 |
Keybuk | NIH_SHOULD I think :p | 17:40 |
Keybuk | it's just in nih/error.h instead | 17:40 |
sadmac2 | Keybuk: I kept finding the same damn 8-line while loop to do it, so I macro'd it. | 17:40 |
Keybuk | really? | 17:41 |
Keybuk | can you find an example of that particular while loop? | 17:41 |
Keybuk | I thought I got rid of them all ages ago | 17: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 |
sadmac2 | Keybuk: it was somewhere in event_operator.c I think | 17:41 |
sadmac2 | yep, that was the exact macro. | 17:42 |
sadmac2 | I did the version that returns a value. I'll put it where it goes. | 17:42 |
Keybuk | that's kinda nice | 17:44 |
Keybuk | e = NIH_MUST (nih_new (NULL, foo)); | 17:44 |
Keybuk | rather than | 17:44 |
Keybuk | NIH_MUST (e = nih_new (NULL, foo)); | 17:44 |
Keybuk | e = NIH_SHOULD (some_call ()); | 17:44 |
Keybuk | if (! e) { | 17:44 |
Keybuk | /* any error except ENOMEM */ | 17:45 |
Keybuk | } | 17:45 |
Keybuk | yes | 17:45 |
sadmac2 | I'll fix it up and mail it in when I get home tonight. | 17:45 |
mbiebl | Md: hi | 19:35 |
mbiebl | so, what are your plans regarding udev, now that lenny is out | 19:35 |
Md | mbiebl: 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 weeks | 20:05 |
mbiebl | Md: please keep me posted on the progress | 20:07 |
Md | are you insterested in helping? | 20:07 |
mbiebl | Have you decided about the /lib/udev/rules.d vs /etc/udev/rules.d issue? | 20:08 |
Md | I see no compelling reasons to diverge from upstream | 20:08 |
mbiebl | Md: I'm asking, because it will probably take some time to migrate all dependend packages over to the new location. | 20:09 |
mbiebl | The the sooner in the squeeze cycle, the better. | 20:09 |
Md | not a big deal, they will not break anyway | 20:09 |
mbiebl | sure | 20:11 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!