Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Didn't try this but...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Didn't try this but...
Authored by: Bernd P. Ziller on Jan 25, '03 08:17:10AM

As you found out, the key part is the redirection of stdout and stderr to /dev/null...

by this you fully detach the background job from shell. if you don't do this, the shell and your backgrounded command still share the same file-handles for stdout and stderr, which makes your script hang.

Sometimes you might even have to redirect stdin with '</dev/null'...

as in 'command >/dev/null 2>&1 </dev/null &'.



[ Reply to This | # ]