sadmac | Keybuk: around? | 00:51 |
---|---|---|
iamthelostboy | hello :) is it possible to start an x application from upstart? | 03:03 |
iamthelostboy | im trying to do an `exec xinit <application>`, when `xinit <application>` works from the command line, though not from upstart | 03:04 |
iamthelostboy | the job starts another application prior to the exec command, which isnt preceeded with exec, just not the x command.. | 03:05 |
sadmac | iamthelostboy: what's the error? | 03:09 |
iamthelostboy | doesnt seem to be anything.. | 03:09 |
sadmac | check your system logs | 03:09 |
iamthelostboy | im just trying to start it on the command line... start <job> | 03:09 |
iamthelostboy | doesnt seem to be much happening in syslog.. | 03:14 |
iamthelostboy | just a job main process killed by TERM signal.. from when I stop the job, i assume | 03:14 |
sadmac | hmm | 03:21 |
sadmac | what about in your xorg logs? | 03:21 |
iamthelostboy | its not getting written.. | 03:23 |
sadmac | hmm | 03:23 |
iamthelostboy | x doesnt appear to be starting at all | 03:23 |
iamthelostboy | should that command work ? | 03:23 |
sadmac | after you do start foojob what does initctl list say? | 03:23 |
iamthelostboy | do i have the direct the console in some way ? | 03:23 |
sadmac | X gets its own console | 03:23 |
iamthelostboy | sorry.. how do i use initctl? im still a little new at some of this stuff | 03:24 |
sadmac | initctl list | 03:25 |
iamthelostboy | that particular job is running with a pid.. | 03:25 |
sadmac | but no X session? | 03:26 |
iamthelostboy | in ps -A the pid is shown as sh, with the following pid as the first executable in the job | 03:26 |
sadmac | which is? | 03:26 |
iamthelostboy | our own executable | 03:27 |
sadmac | ok, so apparently that's hanging :) | 03:27 |
iamthelostboy | well.. its running | 03:27 |
iamthelostboy | the second executable relies on it | 03:27 |
sadmac | I'll need to see your job definition | 03:28 |
iamthelostboy | and i can run the second outside the job | 03:28 |
iamthelostboy | its not too big, so ill just type it here... | 03:29 |
iamthelostboy | start on aksusbd 5 | 03:29 |
iamthelostboy | stop on runlevel [!5] | 03:29 |
iamthelostboy | respawn | 03:29 |
iamthelostboy | script | 03:29 |
iamthelostboy | `/dir/app1 | 03:30 |
iamthelostboy | exec /usr/bin/xinit /dir/app2 | 03:30 |
iamthelostboy | end script | 03:30 |
iamthelostboy | without the ` on app1 | 03:30 |
sadmac | comment out app1, and put twm in for app2. see if you get a twm session | 03:31 |
iamthelostboy | something happened then.. but im not sure what.. | 03:36 |
iamthelostboy | ill check what was going on... | 03:36 |
iamthelostboy | yeah.. i can get a simple x app started without app1 | 03:42 |
iamthelostboy | but i still see nothing about x in initctl | 03:43 |
sadmac | probably because it forks off. | 03:43 |
iamthelostboy | so 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 |
iamthelostboy | i thought it was going to run anything it could, and then pretty much wait at the exec | 03:44 |
sadmac | iamthelostboy: its a bash script | 03:44 |
sadmac | iamthelostboy: it runs the bash script and monitors the bash script as a service | 03:44 |
iamthelostboy | so.. if the 2 apps weren't in the script tags it would run differently | 03:45 |
sadmac | iamthelostboy: you exec so that your service replaces the bash script and steals its pid and parentage | 03:45 |
sadmac | iamthelostboy: no, the job wouldn't work. | 03:45 |
iamthelostboy | oh | 03:45 |
iamthelostboy | i read somewhere that if i background an app in a job, upstart will see the job as complete and exit? | 03:48 |
sadmac | no... | 03:48 |
iamthelostboy | or could i simply run app1 & -- xinit app2 | 03:48 |
sadmac | not if there's further scripting | 03:48 |
sadmac | yeah. that'd do it | 03:48 |
iamthelostboy | of course, now that i have seen it working... | 03:56 |
iamthelostboy | when i stop the job, only app2 ends, which makes sense now.. | 03:56 |
sadmac | yep | 03:56 |
iamthelostboy | but isnt really right | 03:56 |
sadmac | put in another job | 03:56 |
sadmac | and give it start on starting app1job | 03:57 |
iamthelostboy | yeah.. i think ill have to | 03:57 |
iamthelostboy | do i have to put anything special into the app1 job file to emit the event? | 03:57 |
sadmac | if you want a special event then yes. starting app1 is emitted automatically | 03:59 |
iamthelostboy | thanks :) will try it out | 04:00 |
=== mbiebl_ is now known as mbiebl | ||
sadmac2 | Keybuk: ping | 15:47 |
Keybuk | hey | 15:47 |
sadmac2 | Keybuk: remember when we talked about objects with no parents being "parented to NULL"? | 15:48 |
Keybuk | vaguely | 15:48 |
Keybuk | that's the way things work | 15:48 |
sadmac2 | Keybuk: ok, so suppose we actually maintained a child list for NULL, and nih_free(NULL) freed all of NULL's children | 15:49 |
sadmac2 | Keybuk: and suppose we ditched nih_local and made nih_unref behave like nih_unref_only | 15:50 |
sadmac2 | Keybuk: and suppose we called nih_free(NULL) at the end of nih_main_loop_iter | 15:50 |
sadmac2 | Keybuk: see where I'm going? | 15:50 |
Keybuk | err, wouldn't that make things die in a great big fire | 15:50 |
Keybuk | you have to have some top-level objects | 15:50 |
Keybuk | you'd free them every main loop iteration | 15:51 |
Keybuk | and you make nih_local depend on the main loop | 15:51 |
Keybuk | whereas now, it's actually limited to the C context, which is better | 15:51 |
sadmac2 | nih_local would just go away | 15:51 |
Keybuk | and this is a good thing, because? | 15:51 |
sadmac2 | completely, utterly impossible to have forget-to-free errors | 15:52 |
sadmac2 | we've written 9/10 of an automatic garbage collector. why not finish it? | 15:52 |
Keybuk | well, ignoring the fact you're over-freeing everything | 15:54 |
sadmac2 | fixable... | 15:54 |
Keybuk | I don't see that it buys anything? | 15:55 |
Keybuk | things like initctl don't necessarily have a main loop | 15:55 |
Keybuk | so nothing would be freed | 15:55 |
Keybuk | and it's not the kind of thing you want to do in a main loop _anyway_ | 15:55 |
sadmac2 | they can call it manually. | 15:55 |
sadmac2 | nih_free (NULL); or perhaps a more descriptive macro. NIH_GC_CHECKPOINT; | 15:55 |
Keybuk | I prefer nih_local | 15:56 |
mbiebl | sadmac: seen your nice man pages for events | 15:58 |
mbiebl | would you care to submit that upstream | 15:58 |
sadmac2 | mbiebl: notting wrote those. | 15:59 |
sadmac2 | Keybuk: want em? | 15:59 |
Keybuk | sure, send to ML | 15:59 |
mbiebl | sadmac: is there other nice stuff hidden in the fedora package ;-) | 15:59 |
* cwillu pokes sadmac with a stick | 16:41 | |
sadmac2 | cwillu: yes? | 16:42 |
cwillu | nothing it particular beyond the nice man pages :) | 16:42 |
cwillu | s/it/in/ | 16:42 |
cwillu | (in response to 'yes?', not in response to 'is there other nice stuff') | 16:43 |
sadmac2 | he | 16:43 |
sadmac2 | +h | 16:43 |
Keybuk | there's several patches in there that casey hasn't told me about ;) | 16:46 |
sadmac2 | Keybuk: I did tell you about that guy contributing the state-transfer stuff, right? | 16:48 |
Keybuk | yes | 16:55 |
sadmac2 | Keybuk: ok, and you know about the force-on-shutdown-reboot one (I think you commented on the bug...) | 16:56 |
sadmac2 | what else is in here you might be missing... | 16:56 |
sadmac2 | shit. sent from the wrong email address. Now I'm being moderated. | 16:57 |
sadmac2 | damnit thunderbird! | 16:57 |
Keybuk | http://cvs.fedoraproject.org/viewvc/devel/upstart/upstart-force-on-shutdown-reboot.patch?view=markup | 16:58 |
Keybuk | http://cvs.fedoraproject.org/viewvc/devel/upstart/upstart-gcc43.patch?revision=1.1&view=markup | 16:59 |
sadmac2 | Keybuk: I'm pretty sure you commented on the bug for #1. Thought the patch got in there | 17:03 |
mbiebl | hm, maybe it would make sense to release a 0.3.10 with those patches? | 17:19 |
sadmac2 | Keybuk: 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!