dengguochen2003 has asked for the
wisdom of the Perl Monks concerning the following question:

Hi, Monks, I beg your wisdom. I have below leg of code. I execute in rc3 script. When it comes to line 12 it seems the script hangs there for more than 20 hours. See detailed log information below the code. Please be aware that I execute this script in various machines without any problems. Only in this IBM machine with InReach TTY console connected I get this issue.

Below is the log from the above code. Lines 1 and 2 are print on 2/14, and it hangs there. After 20 hours when I login into the console of the machine lines 4 and later come out. From the time stamp on line 4 we can see the 3rd line of code should be executed on 2/14, then the code goes into the ptrace_wo_date() function, and comes to code on line 12, but it hangs there for 20 hours when I login on 2/15 it resumes. Then the code comes to line 45 and plog() prints the time stamp in below log line 21, which is 2/15.

My question is what is the possible reasons for the print() hangs. Why it resumes when I login on the console. I am on IBM machine with Console Access through terminal Server InReach MRV Port 3122.
Appreciate your any comments on this in advance.

Hi, QM, Thank you for the comments on this issue. From the log that line you mentioned already is finished successfully.

4 2013/02/14 16:50:12 execution trace:

Because the time stamp in the above line is retrieved by code at line 3, and line 3 is executed after that line
( system("$cmd > /tmp/instappcmd.out 2>&1") ) you mentioned. So that line you mentioned must be already done successfully. It must hang on the line 12, which calls print function.

Could you explain more? What output buffer do you mean? A buffer allocated by print() function?

Wired thing is that I monitor the execution of the script through a putty terminal and find it hangs there for a long while on 2/14 and leave it there. When I am back to it on 2/15 I find it still hangs. So I connect to the machine through the console. When I am in the console it resumes suddenly. The machine configuration is: IBM server -> InReach TTY -> terminal.