[02:42] <dspstv> hi all
[02:42] <dspstv> im on this machine that has ubuntu
[02:43] <dspstv> so no inittab is present
[02:43] <dspstv> and i just need to add one line to put a program to respawn if it crahses
[02:43] <dspstv> i've read and google has mislead me since yesterday
[02:43] <dspstv> now, someone from the ubuntu channel told me to ask in here
[02:44] <dspstv> in inittab it will be just adding one line...
[02:44] <dspstv> im lost
[02:48] <Keybuk> inittab isn't used in Ubuntu
[02:48] <Keybuk> what would you like to do?
[02:52] <dspstv> Keybuk, yes that i figured
[02:53] <dspstv> i just need to add a line
[02:53] <dspstv> for a program
[02:53] <dspstv> i need to keep alive
[02:53] <dspstv> so, respawn was my friend
[02:54] <Keybuk> what line would you have added?
[03:01] <dspstv> let me see..
[03:01] <dspstv> i have to copy any and just change the service for the program i want
[03:06] <dspstv> need to just know where one does that in upstart
[03:06] <dspstv> please
[03:06] <dspstv> i have a software for music called pd
[03:06] <dspstv> i need to treat it as a deamon
[03:06] <dspstv> i have done that in other distros
[03:06] <Keybuk> you're not helping yourself here
[03:06] <dspstv> sure
[03:06] <dspstv> i can agree
[03:07] <dspstv> im not a pro on this
[03:07] <Keybuk> if you give me the details you enter into inittab, I can tell you what you need to do for upstart
[03:07] <dspstv> ok
[03:07] <Keybuk> e.g. what command is it that you need to run, etc.?
[03:07] <Keybuk> does that command go into the background when you run it?
[03:24] <dspstv> this is what i had used
[03:24] <dspstv> null:12345:respawn:/bin/pd -nogui -verbose -nomidi
[03:24] <dspstv> null:12345:respawn:/bin/pd
[03:25] <Keybuk> ok
[03:25] <Keybuk> so in Upstart parlance, you'd need a file in /etc/event.d containing
[03:25] <Keybuk> respawn
[03:25] <Keybuk> exec /bin/pd -nogui -verbose -nomidi
[03:26] <Keybuk> -- 
[03:26] <Keybuk> that requires manual starting, see the tty1 file for how to make it start and stop in certain runlevels
[03:29] <dspstv> Keybuk, the name of that file requieres a special naming structure?
[03:29] <dspstv> Keybuk, tx!
[03:29] <Keybuk> dspstv: no, name can be whatever you like
[03:36] <dspstv> man tx again
[03:36] <dspstv> i take note now
[06:15] <j_> hi
[06:16] <Jc2k> hi
[09:45] <j_> hi
[09:45] <Jc2k> hi
[09:45] <j_> I'm looking for an upstart maintainer
[09:46] <Jc2k> if you ask a q and idle someone will get back to u
[09:47] <j_> I'd like to known when it's schedule to add the "and" condition in upstart
[10:23] <Keybuk> j_: it's already added on bzr trunk, but has interestingly unexpected issue
[10:26] <j_> could you be more specific?
[10:27] <Keybuk> well, take a simple example
[10:27] <Keybuk> start on foo and bar
[10:27] <Keybuk> stop on frodo or bilbo
[10:27] <Keybuk> -- 
[10:27] <Keybuk> foo happens, job remains stopped
[10:27] <Keybuk> bar happens, job starts
[10:27] <Keybuk> frodo happens, job sttops
[10:27] <Keybuk> --
[10:27] <Keybuk> now, do foo *and* bar both need to happen again?
[10:27] <Keybuk> or is it enough that either happens?
[10:36] <Jc2k> Keybuk: eh, in my scheduler i was lucky in that i could say *both* always needed to happen again :D
[10:37] <Jc2k> re the two seperate upstart services idea, i think you would have a chance at doing it by exposing an interface from the manager back the job handler (pid 1)
[10:37] <j_> I think that it will stop
[10:37] <Jc2k> but it would get messy
[10:37] <Keybuk> j_: remain stopped?
[10:38] <Keybuk> so if frodo or bilbo happen, the job needs both foo and bar to happen again?
[10:38] <j_> no
[10:38] <Keybuk> no?  what happens once a job stops then?
[10:38] <Keybuk> which events can restart it?
[10:38] <j_> not necessarlely
[10:39] <j_> you may need to a once condition
[10:40] <j_> like that
[10:40] <Keybuk> ?
[10:40] <j_> start_once on  foo and bar 
[10:40] <Keybuk> ?
[10:40] <j_> stop on  frodo or bilbo
[10:41] <j_> respan on  foo or bar
[10:41] <Keybuk> that makes it insanely complicated ;)
[10:41] <j_> You're right
[10:41] <Keybuk> since then upstart would need to track whether a job has been run once or not :)
[10:42] <j_> I think that the problem is to known what do to respam it
[10:43] <Keybuk> in practice I think that consistency is better than flexibility
[10:43] <Keybuk> since it's easier to document consistent behaviour
[10:43] <Keybuk> and consistent behaviour has emergent properties
[10:43] <Keybuk> the problem I hit was I implemented it to both events had to happen again
[10:43] <Keybuk> once a job was in stop/waiting, it "forgot" what had started it
[10:43] <Keybuk> the problem was that this worked fine
[10:43] <Keybuk> except when the events happened while the job was still stopping
[10:44] <Keybuk> in which case either one would start it again
[10:44] <Keybuk> so you ended up with a curious situation where the behaviour depended on how quick you were
[10:44] <Keybuk> the worst kind of race condition
[10:44] <Keybuk> so I realised that the event expression has to be evaluated
[10:44] <Keybuk> but then instantly forgotten the moment it's true
[10:44] <Keybuk> instead somehow transferring the result of that into the job
[10:44] <Keybuk> not as easy as it appeared
[10:46] <j_> could it be possible to add a "schedule work" and a lock of the events when you have a stop event
[10:47] <Keybuk> j_: sorry, I don't follow
[10:48] <j_> that will fix the problem, when you have a stop , if a new event arrive it will be handle after the stop not a the same time
[10:49] <Jc2k> ahh
[10:49] <Jc2k> a queue
[10:49] <j_> yes
[10:49] <Jc2k> j_: is that what you meant?
[10:49] <Jc2k> ahh
[10:49] <Jc2k> too slow
[10:49] <Jc2k> :P
[10:50] <j_> just when you have a stop condition and only for its events
[10:50] <j_> it will append not every time
[10:56] <Keybuk> or make the expression indempotent
[10:56] <Keybuk> so once evaluation has finished, it can safely be evaluated again immediately
[11:04] <j_> what did you if a stop takes 1 minutes
[11:05] <j_> ?
[11:07] <Keybuk> it'd be restarted at the end of it
[11:07] <Keybuk> since the goal would be start, so on leaving the post-stop state, it'd move back to pre-start
[11:08] <j_> so you have a queue
[11:08] <Keybuk> no
[11:09] <j_> how did you do?
[11:09] <Keybuk> as I said, making the event expression indempotent
[11:10] <Keybuk> once evaluated to true, the result is copied into the job
[11:10] <Keybuk> and then the expression is cleared
[11:10] <Keybuk> leaving it to be evaluated again immediately
[11:13] <Keybuk> ( bah, lifeless isn't online ...
[11:13] <Keybuk>   I can't troll him with BZR IS GIVING ME A SUB-OPTIMAL EXPERIENCE
[11:13] <Keybuk>   "git would handle my use case much better"
[11:13] <Keybuk>   etc. :p )
[11:15] <Jc2k> troll me if you like, im the anti-git troll on ddl after all :)
[11:16] <Keybuk> unfortunately I don't like git either
[11:16] <Keybuk> I rather like bzr
[11:16] <Keybuk> except when it behaves like a moronic child, like it's doing right now
[11:17] <Keybuk> *all* I want to do is cherry-pick commits
[11:17] <Keybuk> apparently this is hard
[11:17] <Jc2k> :D
[11:21] <Keybuk> Holy Crap
[11:21] <Keybuk> 0.3.8 was released exactly 7 months ago
[11:22] <j_> And when will arrive the new release?
[11:23] <Keybuk> which new release? :)
[11:24] <ion_> Upstart XP
[11:24] <AlexExtreme> Huh? XP? Don't you mean Vista? ;)
[11:24] <Keybuk> wasn't Vista the name of an Amiga program to render landscapes?
[11:25] <j_> 0.3.9 or 0.4.0
[11:27] <Keybuk> there won't be an 0.4.0
[11:27] <Keybuk> next planned major is 0.5
[11:27] <Keybuk> see topic :)
[11:28] <j_> I'm currently read the webpage
[11:28] <Keybuk> https://lists.ubuntu.com/archives/upstart-devel/2007-October/000468.html
[11:30] <j_> yes
[11:31] <ion_> Hm. I remember the program, but i dont remember its name.
[11:32] <ion_> It was a really cool piece of software. :-)
[11:32] <ion_> (Assuming were thinking of the same Amiga program that generates landscapes.)
[11:32] <Keybuk> Wikipedia says it was Vista
[11:32] <Keybuk> and then later, VistaPro
[11:34] <ion_> Anyone watch Heroes? http://heh.fi/heroes/ </spam>
[11:35] <Keybuk> ion_: am about half way through it
[11:35] <Jc2k> im in search of s2
[11:35] <ion_> Have you read the comics? The episodes often assume youve read the corresponding ones as well.
[11:36] <ion_> (And thus the page, to easily know which ones to read between which episodes.)
[11:37] <Keybuk> ion_: I didn't even know there were comics
[11:39] <ion_> Some times the comics enlighten the history of existing characters; some times they even originally introduce characters used in the following episodes.
[11:46] <Keybuk> j_: https://launchpad.net/upstart/0.3/0.3.9
[11:51] <j_> Keybuk: thanks