Please bottom post.... > > If you dont understand my question then I assume you do not know unix or > tail -f ?
That would be a shocker. Trust me, Bob knows about unix and tail... I want to after a sleep of 5-8 seconds, send a kill signal to > the previous command then increment the counter. thank you! > > More than likely he meant that running a single command will block until the process has finished, which means your signal will never get passed to a command that is still running, since to get to that point it would have had to have finished. You should probably go back and read the second doc he mentioned, so that you understand better what can be done on Unix. The basic problem with your code is that you would not issue a command like 'tail -f' inside of the while loop. You would issue it first, then while you read from the command do something, when you are done close the command, so your pseudo-code doesn't work the way you think it will. http://danconia.org > > Derek B. Smith > OhioHealth IT > UNIX / TSM / EDM Teams > > > > > > > Bob Showalter <[EMAIL PROTECTED]> > 05/07/2004 10:57 AM > > > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, Beginners Perl > <[EMAIL PROTECTED]> > cc: > Subject: RE: process signals > > > [EMAIL PROTECTED] wrote: > > I have an application system command that is like tail -f in UNIX and > > I want to say > > > > x=1 > > while x < 10 > > do > > 'command' append to log > > print "\n" append to log > > issue HANGUP or KILL SIGNAL > > x+=1 > > done > > > > How do I issue a hangup signal to this process using perl? > > I'm not sure I understand your problem, but the perl way to send a signal > is > with the kill() function. The way to catch a signal is by installing a > handler using the %SIG hash. > > perldoc -f kill > perldoc perlipc > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>