Hi, Thanks for your help, 1 more question related to your advice Ok, How can I kill exec after it was started in different thread? Igor
-----Original Message----- From: david [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 8:10 PM To: [EMAIL PROTECTED] Subject: RE: threads in perl Igor Ryaboy wrote: > I have no problem to alarm when timeout occurs in specific thread, I have > a difficulty to abort a "system" command in that thread. in that case, fork a different process in your thread, replace system with exec and use the pid of the newly created process to abort itself when you need to. because exec replaces the running image, whatever you exec becomes the running process and because you have the pid to it, you can easily abort it without affecting the thread or your main process. david -- sub'_{print"@_ ";* \ = * __ ,\ & \} sub'__{print"@_ ";* \ = * ___ ,\ & \} sub'___{print"@_ ";* \ = * ____ ,\ & \} sub'____{print"@_,\n"}&{_+Just}(another)->(Perl)->(Hacker) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>