good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Sz command hanging and outputting ZNAK’sby M1k3 (Initiate) |
on May 18, 2011 at 09:24 UTC ( [id://905442]=perlquestion: print w/replies, xml ) | Need Help?? |
M1k3 has asked for the wisdom of the Perl Monks concerning the following question: OS – Linux I have a Perl script which exec’s the sz command to send files over modems (Z MODEM protocol). In some instances (for example when the power goes out on the receiving modem) the sz command hangs and ZNAK errors are written to a log file causing the process to hang and log file to rapidly grow. For example: Retry 0: Bad CRC Retry 0: Got ERROR Retry 0: Bad CRC Retry 0: Got ERROR Retry 0: Got ZNAK Retry 0: Got ZNAK Retry 0: Got ZNAK Retry 0: Got ZNAK How can I trap for such errors/terminate the process as soon as there is a problem? Is there a parameter I can pass? Sample code (exec $cmd is where it hangs):
Back to
Seekers of Perl Wisdom
|
|