/srv/irclogs.ubuntu.com/2011/05/17/#upstart.txt

elik_workI've been trying to turn a process not really built to be a deamon (and to which I have no access to source) into one, but wihtout success21:21
ionSounds like fun.21:22
elik_workAt first, I noticed it didn't like to be untied from stdin/stdout (could not background it without stopping)21:22
elik_workSo now I start it through screen21:22
elik_workit works when I do it simply from the command line21:23
elik_workbut with an exec from an upstart job, it doesn't21:23
elik_workion: yeah... it kinda is, but it's just so much more fun when it works :)21:23
elik_workSo I was wondering what was different between me calling "screen -d -m bash -c 'my_command'" from the shell and from an exec stanza21:25
=== hallyn_ is now known as hallyn
elik_workfor some reason, it seems like a child creation is failing when my program is launched from upstart :(22:15
elikwhat could cause a program to behave differently depending on wether it's called from command line or from upstart?23:05
elikgiven the same command (screen -d -m sh -c 'blackboxcommand')23:06
Keybukelik: commands run from upstart aren't connected to a tty23:27
elikKeybuk: doesn't screen take care of that^23:27
Keybukelik: I always thought screen itself needed a tty23:28
Keybukalso commands from upstart are run in a clean environment23:28
Keybuke.g. $HOME is not set23:28
elikKeybuk: I do set the needed variables through env stanzas23:29
elikKeybuk: as far as tty goes, I do start services like that using init.d23:30
elikscreen -d -m detaches and creates a daemon23:30
Keybukdetaches from what?23:30
elikKeybuk: screen exists so you can detech the terminal from under it23:34
Keybukbut in summary, there are plenty of things that can cause a command run from upstart to behave differently than one run from a tty23:36
ionBtw, tmux start can be done without a tty.23:37
elikion: without going into details, aren't tmux and screen somewhat similar?23:39
elikKeybuk: right :(23:39
ionYes, but i’m under the impression the code quality of tmux is generally better.23:39
ionAlso, tmux doesn’t do a a bunch unrelated things, it only tries to do one thing well.23:40
ion+of23:40

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