note
Crackers2
<p>Does it work if you change the exec to</p>
<code>
die "Unable to exec\n" unless(exec("/usr/bin/ssh localhost /bin/sleep 10 </dev/null"));
</code>
<p>or</p>
<code>
die "Unable to exec\n" unless(exec("/usr/bin/ssh -n localhost /bin/sleep 10"));
</code>
<p>IIRC ssh may be pre-reading STDIN and then discarding the contents when it's not actually needed. Redirecting stdin for the ssh command makes sure there won't be any interference with your main program.</p>
1068335
1068335