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

sadmacKeybuk: around?00:51
iamthelostboyhello :)  is it possible to start an x application from upstart?03:03
iamthelostboyim trying to do an `exec xinit <application>`, when `xinit <application>` works from the command line, though not from upstart03:04
iamthelostboythe job starts another application prior to the exec command, which isnt preceeded with exec, just not the x command..03:05
sadmaciamthelostboy: what's the error?03:09
iamthelostboydoesnt seem to be anything..03:09
sadmaccheck your system logs03:09
iamthelostboyim just trying to start it on the command line... start <job>03:09
iamthelostboydoesnt seem to be much happening in syslog..03:14
iamthelostboyjust a job main process killed by TERM signal.. from when I stop the job, i assume03:14
sadmachmm03:21
sadmacwhat about in your xorg logs?03:21
iamthelostboyits not getting written..03:23
sadmachmm03:23
iamthelostboyx doesnt appear to be starting at all03:23
iamthelostboyshould that command work ?03:23
sadmacafter you do start foojob what does initctl list say?03:23
iamthelostboydo i have the direct the console in some way ?03:23
sadmacX gets its own console03:23
iamthelostboysorry.. how do i use initctl? im still a little new at some of this stuff03:24
sadmacinitctl list03:25
iamthelostboythat particular job is running with a pid..03:25
sadmacbut no X session?03:26
iamthelostboyin ps -A the pid is shown as sh, with the following pid as the first executable in the job03:26
sadmacwhich is?03:26
iamthelostboyour own executable03:27
sadmacok, so apparently that's hanging :)03:27
iamthelostboywell.. its running03:27
iamthelostboythe second executable relies on it03:27
sadmacI'll need to see your job definition03:28
iamthelostboyand i can run the second outside the job03:28
iamthelostboyits not too big, so ill just type it here...03:29
iamthelostboystart on aksusbd 503:29
iamthelostboystop on runlevel [!5]03:29
iamthelostboyrespawn03:29
iamthelostboyscript03:29
iamthelostboy`/dir/app103:30
iamthelostboyexec /usr/bin/xinit /dir/app203:30
iamthelostboyend script03:30
iamthelostboywithout the ` on app103:30
sadmaccomment out app1, and put twm in for app2. see if you get a twm session03:31
iamthelostboysomething happened then.. but im not sure what..03:36
iamthelostboyill check what was going on...03:36
iamthelostboyyeah.. i can get a simple x app started without app103:42
iamthelostboybut i still see nothing about x in initctl03:43
sadmacprobably because it forks off.03:43
iamthelostboyso my job is getting stopped at app1, right? how do i make is run the first app, leave it running, and continue onto the second..03:44
iamthelostboyi thought it was going to run anything it could, and then pretty much wait at the exec03:44
sadmaciamthelostboy: its a bash script03:44
sadmaciamthelostboy: it runs the bash script and monitors the bash script as a service03:44
iamthelostboyso.. if the 2 apps weren't in the script tags it would run differently03:45
sadmaciamthelostboy: you exec so that your service replaces the bash script and steals its pid and parentage03:45
sadmaciamthelostboy: no, the job wouldn't work.03:45
iamthelostboyoh03:45
iamthelostboyi read somewhere that if i background an app in a job, upstart will see the job as complete and exit?03:48
sadmacno...03:48
iamthelostboyor could i simply run app1 & -- xinit app203:48
sadmacnot if there's further scripting03:48
sadmacyeah. that'd do it03:48
iamthelostboyof course, now that i have seen it working...03:56
iamthelostboywhen i stop the job, only app2 ends, which makes sense now..03:56
sadmacyep03:56
iamthelostboybut isnt really right03:56
sadmacput in another job03:56
sadmacand give it start on starting app1job03:57
iamthelostboyyeah.. i think ill have to03:57
iamthelostboydo i have to put anything special into the app1 job file to emit the event?03:57
sadmacif you want a special event then yes. starting app1 is emitted automatically03:59
iamthelostboythanks :) will try it out04:00
=== mbiebl_ is now known as mbiebl
sadmac2Keybuk: ping15:47
Keybukhey15:47
sadmac2Keybuk: remember when we talked about objects with no parents being "parented to NULL"?15:48
Keybukvaguely15:48
Keybukthat's the way things work15:48
sadmac2Keybuk: ok, so suppose we actually maintained a child list for NULL, and nih_free(NULL) freed all of NULL's children15:49
sadmac2Keybuk: and suppose we ditched nih_local and made nih_unref behave like nih_unref_only15:50
sadmac2Keybuk: and suppose we called nih_free(NULL) at the end of nih_main_loop_iter15:50
sadmac2Keybuk: see where I'm going?15:50
Keybukerr, wouldn't that make things die in a great big fire15:50
Keybukyou have to have some top-level objects15:50
Keybukyou'd free them every main loop iteration15:51
Keybukand you make nih_local depend on the main loop15:51
Keybukwhereas now, it's actually limited to the C context, which is better15:51
sadmac2nih_local would just go away15:51
Keybukand this is a good thing, because?15:51
sadmac2completely, utterly impossible to have forget-to-free errors15:52
sadmac2we've written 9/10 of an automatic garbage collector. why not finish it?15:52
Keybukwell, ignoring the fact you're over-freeing everything15:54
sadmac2fixable...15:54
KeybukI don't see that it buys anything?15:55
Keybukthings like initctl don't necessarily have a main loop15:55
Keybukso nothing would be freed15:55
Keybukand it's not the kind of thing you want to do in a main loop _anyway_15:55
sadmac2they can call it manually.15:55
sadmac2nih_free (NULL); or perhaps a more descriptive macro. NIH_GC_CHECKPOINT;15:55
KeybukI prefer nih_local15:56
mbieblsadmac: seen your nice man pages for events15:58
mbieblwould you care to submit that upstream15:58
sadmac2mbiebl: notting wrote those.15:59
sadmac2Keybuk: want em?15:59
Keybuksure, send to ML15:59
mbieblsadmac: is there other nice stuff hidden in the fedora package ;-)15:59
* cwillu pokes sadmac with a stick16:41
sadmac2cwillu: yes?16:42
cwillunothing it particular beyond the nice man pages :)16:42
cwillus/it/in/16:42
cwillu(in response to 'yes?', not in response to 'is there other nice stuff')16:43
sadmac2he16:43
sadmac2+h16:43
Keybukthere's several patches in there that casey hasn't told me about ;)16:46
sadmac2Keybuk: I did tell you about that guy contributing the state-transfer stuff, right?16:48
Keybukyes16:55
sadmac2Keybuk: ok, and you know about the force-on-shutdown-reboot one (I think you commented on the bug...)16:56
sadmac2what else is in here you might be missing...16:56
sadmac2shit. sent from the wrong email address. Now I'm being moderated.16:57
sadmac2damnit thunderbird!16:57
Keybukhttp://cvs.fedoraproject.org/viewvc/devel/upstart/upstart-force-on-shutdown-reboot.patch?view=markup16:58
Keybukhttp://cvs.fedoraproject.org/viewvc/devel/upstart/upstart-gcc43.patch?revision=1.1&view=markup16:59
sadmac2Keybuk: I'm pretty sure you commented on the bug for #1. Thought the patch got in there17:03
mbieblhm, maybe it would make sense to release a 0.3.10 with those patches?17:19
sadmac2Keybuk: you want to approve my message to upstart-devel with the manpage in it? (I used my school email by mistake, which isn't subscribed)18:31
=== notting__ is now known as notting

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