in reply to how to sleep-awake on perl script?

Linux, you say? Signals can help:
> perl -le 'print "I am $$. I sleep now."; kill STOP => $$; print "I a +m awake again!"' I am 22667. I sleep now. Stopped (signal) > perl -e 'kill CONT => 22667' I am awake again! [1] 22667 Exit 0 perl -le print "I am $$. I sleep now."; kill STOP => +$$; print "I am alive again!"

Replies are listed 'Best First'.
Re^2: how to sleep-awake on perl script?
by Anonymous Monk on Apr 24, 2009 at 00:57 UTC
    Hi, I am stopping the program by control+z .i just want to check if ctrl+z is passed stop the process (even on ssh)or send it to background and bring it to fg it whenever i want. Rightnow-Since I am on SSh-when I stop(ctrl+z) stops and with fg comes foreground but if logoff from ssh-perl script goes away- please help me, Thanks in advance,