[02:05] <sadmac> Keybuk: what do you have in mind?
[04:21] <sadmac> Does the pid of the process get sent to post-start in any manner?
[08:17] <keesj> Hi
[08:17] <keesj> I finished my state machine thingy.
[08:18] <keesj> I now need to send event from within the kernel. it that possible?
[08:45] <Keybuk> sadmac: "status" will give it to you
[13:09] <keesj> re
[13:09] <keesj> I have two more interesting questions :P
[13:11] <keesj> it looks like when I perform an emit from one jobs it waits for the emit to be processesd before it returns
[13:12] <keesj> is there a way around this? (my job does a pivot_root) 
[13:23] <keesj> hmm --no-wait helps
[14:32] <Keybuk> keesj: right, you found it ;) --no-wait <g>
[14:32] <Keybuk> also make sure the job is configured right
[14:32] <Keybuk> if the emit is waiting for the job to stop again, and it's a daemon, you need either "service" or "respawn" in the job
[14:32] <Keybuk> then emit will only wait until it's started
[15:55] <sadmac_> Keybuk: so... logd... how do we replace it?
[16:03] <Keybuk> define what we want ;)
[16:03] <Keybuk> for me the main thing is to be able to capture output from jobs
[16:03] <Keybuk> and have that logged and not lost
[16:03] <Keybuk> (even if filesystem not mounted)
[16:04] <Keybuk> and maybe even mail that (cron-like)
[16:11] <keesj> what would service do?
[16:15] <sadmac_> Keybuk: pushing it into syslog would do most of that.
[16:18] <keesj> cool, after a pivot root and a kill 1 it sill works (init apparently reloaded from a different partition)
[16:19] <Keybuk> sadmac_: indeed
[16:20] <sadmac_> Keybuk: so the issue is: how do we attach a reliable file descriptor to processes and how do we get the input from there to syslog
[17:11] <Keybuk> sadmac_: right
[17:11] <Keybuk> and e.g. how does upstart tell the logging daemon that the output of a particular job should be e-mailed out
[17:11] <Keybuk> (since the job failed)
[18:14] <sadmac_> Keybuk: I'd assume upstart would have pipes open to the programs being logged, and simply stuff the output to syslog
[18:15] <Keybuk> that means init has to do quite a bit of work for every process running though, no?
[18:16] <sadmac_> Keybuk: is there a way to open a socket direct to syslog?
[18:17] <sadmac_> Keybuk: if we want to keep an external daemon, using ptys for each bothers me less and less.
[18:19] <Keybuk> yeah, the problem then is when that logging daemon dies
[18:20] <Keybuk> strange things happen to shell scripts
[18:20] <sadmac_> Ahh, yeah, if you loose the master fd the pty still drops
[18:21] <sadmac_> I know what kind of IO we need, and I can write a kernel module to support it, but I don't like the idea of pushing that upstream :(
[18:22] <Keybuk> hehe, indeed
[18:23] <sadmac_> That's what I need to do, find some kernel devs. There's got to be a mechanism for this.
[18:23] <Keybuk> there probably is already
[18:23] <Keybuk> I just haven't read the relevant section of Stevens yet
[18:23] <Keybuk> logd is quite low on my priority list right now
[18:24] <Keybuk> the existing one "works" for people that want it
[18:24] <sadmac_> Keybuk: which book is Stevens?
[18:25] <Keybuk> any of his
[18:25] <Keybuk> his Unix Network Programming series will have the likely answer
[18:25] <Keybuk> since that covers all types of sockets, file descriptors and IPC
[18:25] <sadmac_> ahh, that one
[18:31] <sadmac_> Keybuk: I've got it :)
[18:32] <sadmac_> Keybuk: Pipe it to a file in /dev/shm
[18:32] <Keybuk> the book?
[18:32] <Keybuk> /dev/shm isn't mounted when init starts
[18:33] <sadmac_> It could be. For us at least
[18:34] <sadmac_> Hmm, and it turns out it doesn't spool the way I had hoped
[18:35] <Keybuk> some kind of shared ring buffer would be ideal
[18:36] <Keybuk> so the app could output freely
[18:36] <Keybuk> and a logging daemon could pick it up and read from it
[18:36] <Keybuk> but if it didn't, that wouldn't be bad
[18:36] <sadmac_> exactly
[18:36] <sadmac_> in fact what we need is very nearly the example from the linux device drivers book.
[18:54] <Keybuk> heh
[18:54]  * sadmac_ looks at list of known major numbers in linux kernel
[18:58] <Keybuk> right, back tomorrow
[18:58]  * Keybuk heads to london
[18:58] <sadmac_> damn. he left