elik_work | I'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 success | 21:21 |
---|---|---|
ion | Sounds like fun. | 21:22 |
elik_work | At first, I noticed it didn't like to be untied from stdin/stdout (could not background it without stopping) | 21:22 |
elik_work | So now I start it through screen | 21:22 |
elik_work | it works when I do it simply from the command line | 21:23 |
elik_work | but with an exec from an upstart job, it doesn't | 21:23 |
elik_work | ion: yeah... it kinda is, but it's just so much more fun when it works :) | 21:23 |
elik_work | So I was wondering what was different between me calling "screen -d -m bash -c 'my_command'" from the shell and from an exec stanza | 21:25 |
=== hallyn_ is now known as hallyn | ||
elik_work | for some reason, it seems like a child creation is failing when my program is launched from upstart :( | 22:15 |
elik | what could cause a program to behave differently depending on wether it's called from command line or from upstart? | 23:05 |
elik | given the same command (screen -d -m sh -c 'blackboxcommand') | 23:06 |
Keybuk | elik: commands run from upstart aren't connected to a tty | 23:27 |
elik | Keybuk: doesn't screen take care of that^ | 23:27 |
Keybuk | elik: I always thought screen itself needed a tty | 23:28 |
Keybuk | also commands from upstart are run in a clean environment | 23:28 |
Keybuk | e.g. $HOME is not set | 23:28 |
elik | Keybuk: I do set the needed variables through env stanzas | 23:29 |
elik | Keybuk: as far as tty goes, I do start services like that using init.d | 23:30 |
elik | screen -d -m detaches and creates a daemon | 23:30 |
Keybuk | detaches from what? | 23:30 |
elik | Keybuk: screen exists so you can detech the terminal from under it | 23:34 |
Keybuk | but in summary, there are plenty of things that can cause a command run from upstart to behave differently than one run from a tty | 23:36 |
ion | Btw, tmux start can be done without a tty. | 23:37 |
elik | ion: without going into details, aren't tmux and screen somewhat similar? | 23:39 |
elik | Keybuk: right :( | 23:39 |
ion | Yes, but i’m under the impression the code quality of tmux is generally better. | 23:39 |
ion | Also, tmux doesn’t do a a bunch unrelated things, it only tries to do one thing well. | 23:40 |
ion | +of | 23:40 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!