Thanks Travis, Shlomi , Shawn, Luca, and James.
The program pauses i.e does not run further when I press Cntrl –S
When I press Ctrl-Q again, the program resumes excactly where it was when I hit 
cntrl-q.
It is not a deamon, but a simple automation program and it is single threaded , 
goes on sequentially.
I need to try out the programs that you suggested .
However I don’t accept that the program will be running in the background when 
I press Ctrl+s.
In the below example, once I start the program after seeing “i is 5” on the 
output, if I do ctrl+s, the output resumes at I is 6 even if I  press ctrl+q 
after a minute or so.
I expect it to print out till say i=65 during the 1 minute and I see the output 
all at once when I do ctrl+q
I tried out a simple shell program and  it  also seems to be the same.(as the 
perl one)
Is it that if the program is multi threaded or something like that that the 
program will keep to print even though I have paused  the screen?
So, when I press ctrl+q again all the buffered output is emptied out first and 
then the current output from the program.
May be!!

Sorry if it is out of topic for this forum.



From: Travis Thornhill [mailto:madslashers2...@yahoo.com]
Sent: 06 June 2013 17:04
To: Nemana, Satya
Cc: beginners@perl.org
Subject: Re: how to make perl program run continue when i press control+s to 
pause screen output



On Jun 5, 2013, at 4:18, "Nemana, Satya" 
<snem...@sonusnet.com<mailto:snem...@sonusnet.com>> wrote:
Hi

I am having a slight difficulty in getting this accomplished.
When my perl program keeps running, I sometimes need to pause the screen output 
and check some things on the output.
But, I want my program to still keep running  while I pause the screen. (using 
ctrl+s on putty)
But the program also is pausing.(I tested this with a simple program which 
prints number from 1-100 sleeping 1 second after each print , but the main 
program I am trying to get this working is much complex, so will try things 
here first before modifying the original program)

Test Code :

use strict;
use warnings;
for (my $i=1; $i <= 200; $i++)
{
print "\ni is $i";
sleep 1;
}

Please, could someone throw some light on which areas of perl to look at for 
this.
I am not looking for a program, but specific areas where I have to do the 
reading.
I will come back with the program once I can make out what to do for any 
suggestions.

Thanks,
Satya


Your program should still be running, and it should still accept keyboard 
input. After ctrl-s, you just can't see any input/output. Try ctrl-q to recover.

Reply via email to