note
ikegami
<p>Your snippet makes no sense (although none of this explains the crash).
<ul>
<li><c>system(1, ...)</c> does not return zero on success.
<li><c>system(1, ...)</c> does not return the exit code of the child. It returns the PID of the child.
<li><c>$?</c> is being checked before the child has finished running, so its value is meaningless.
</ul>
<p>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 <c>system(@cmd)</c>, not <c>system(1, @cmd)</c>.
605706
605706