backgrounding a script

2007-06-21 Thread MiKe McClain
Thanks, Rob I hadn't even considered recursion. Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: backgrounding a script

2007-06-20 Thread Bob McGowan
MiKe McClain wrote: > Is there a way for a script to background itself? > Thanks, > Mike > > Yes. But you gotta be careful, it's very easy to get a run away process series. The basic idea is that the script has to rerun itself in the background and exit. The way I do this is to set a flag in

Re: backgrounding a script

2007-06-20 Thread Karl E. Jorgensen
On Wed, Jun 20, 2007 at 09:54:20AM -0700, MiKe McClain wrote: > Is there a way for a script to background itself? Not as such - but you can play trick by having the script re-invoke itself: #!/bin/bash if test -t 0 ; then nohup $0 "$@" & exit 0 fi echo Doing stu

backgrounding a script

2007-06-20 Thread MiKe McClain
Is there a way for a script to background itself? Thanks, Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]