Hi there!
I'm running a Perl program (on a p630 running AIX 5.2) which calls a Kermit script to do a modem to modem file transfer.
My Perl book says that in order to check the return code of the Kermit script, I need to divide the value by 256. THis works fine about 95% of the time. During the other 5%, the Kermit script doesn't let go of the tty that the modem is connected to and gives a return code of 0.0546875 or 14/256.
The last three lines of my Kermit script are:
hangup
echo Script completed successfully!
exit 1
The "Script completed successfully!" message appears in the Kermit log, followed (95% of the time) with "Closing /dev/tty2...OK". When the Kermit log doesn't have the "Closing /dev/tty2...OK" message, the "14/256" return code is returned to the Perl program, instead of the usual return code of "1".
Does anyone know why it's doing this? Do I need to put something in my Kermit script to explicitly close the tty? My Kermit book doesn't mention anything about that.
Any info would be appreciated. Thanks!
I'm running a Perl program (on a p630 running AIX 5.2) which calls a Kermit script to do a modem to modem file transfer.
My Perl book says that in order to check the return code of the Kermit script, I need to divide the value by 256. THis works fine about 95% of the time. During the other 5%, the Kermit script doesn't let go of the tty that the modem is connected to and gives a return code of 0.0546875 or 14/256.
The last three lines of my Kermit script are:
hangup
echo Script completed successfully!
exit 1
The "Script completed successfully!" message appears in the Kermit log, followed (95% of the time) with "Closing /dev/tty2...OK". When the Kermit log doesn't have the "Closing /dev/tty2...OK" message, the "14/256" return code is returned to the Perl program, instead of the usual return code of "1".
Does anyone know why it's doing this? Do I need to put something in my Kermit script to explicitly close the tty? My Kermit book doesn't mention anything about that.
Any info would be appreciated. Thanks!