in reply to Problem with 'system' function in Windows Vista
Your snippet makes no sense (although none of this explains the crash).
- system(1, ...) does not return zero on success.
- system(1, ...) does not return the exit code of the child. It returns the PID of the child.
- $? is being checked before the child has finished running, so its value is meaningless.
Did you really mean to execute the child asynchronously? You're acting as if you want the child to end before proceeding. If so, you want system(@cmd), not system(1, @cmd).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Problem with 'system' function in Windows Vista
by diotalevi (Canon) on Mar 20, 2007 at 18:49 UTC | |
by ikegami (Patriarch) on Mar 20, 2007 at 19:19 UTC | |
by diotalevi (Canon) on Mar 20, 2007 at 23:32 UTC | |
by tye (Sage) on Mar 20, 2007 at 23:49 UTC |
In Section
Seekers of Perl Wisdom