Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl program which calls a Kermit script giving bad return code

Status
Not open for further replies.

Spab23

Programmer
Jul 22, 2003
43
0
0
CA
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top