in reply to Fork Problem
Off-hand, your script is forking and staying forked. Your system call will return when the command is completed, and then continue execution of your script just as if it were the parent (at least until the parent kills it). Have you verified that the script will successfully do a system call with that argument without problems?
I'm also tempted to ask you what you're trying to do here. Is your sleep/kill combo an attempt at enforcing a timeout? Consider alarm in the child process for that. Either way, you're going to be a lot better off putting an exit after your system call, or use exec instead of system (checking to be sure exec doesn't return in an error).
If this doesn't help you, we need more information.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Fork Problem
by Anonymous Monk on Dec 08, 2000 at 02:29 UTC | |
by Ovid (Cardinal) on Dec 08, 2000 at 02:38 UTC | |
by zigster (Hermit) on Dec 08, 2000 at 15:39 UTC | |
by Fastolfe (Vicar) on Dec 09, 2000 at 06:35 UTC |