I have no problem to alarm when timeout occurs in specific thread, I have a difficulty to abort a "system" command in that thread.
-----Original Message----- From: david [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 9:14 PM To: [EMAIL PROTECTED] Subject: RE: threads in perl Igor Ryaboy wrote: > Hi, > I have a thread that invokes system("command") that may stuck. I can't let > this thread die because it may take a lot of time. Example: > > threads->new(\&srun); > .. > .. > sub srun { > system("...."); > threads->self->join; > } > I need to kill the system command if it takes more than define timeout. > this's a faq: perldoc -q timeout 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>