develooper Front page | perl.ithreads | Postings from September 2010

RE: Killing a thread

Thread Previous | Thread Next
From:
Ajeet Kumar
Date:
September 29, 2010 02:34
Subject:
RE: Killing a thread
Message ID:
DF735188ED91BD458FA0E0C17929339F95421730@GUREXMB01.ASIAN.AD.ARICENT.COM
Hello Wong,

Following is my approach in this case...

--Execute the "ps -A" command
-- Observe the third column , which is total time taken by process
-- check the process ID from the first column
-- send a kill -9 signal to required process ID

If any confusion is left, then do mail back...

-----Original Message-----
From: Danny Wong (dannwong) [mailto:dannwong@cisco.com]
Sent: Wednesday, September 29, 2010 4:12 AM
To: perl-ithreads@perl.org
Subject: Killing a thread

Hi Perl Thread GURUS,
        Here is my situation. I started, say 10 threads, executing some
command, 1 or 2 of them is hanging for over 2 hours. I want to put in
some logic that if the thread run time passes an hour threshold kill
that thread or return and fail the thread. Any ideas on how I can
accomplish this task? Thanks.

Sincerely yours,
Danny H. Wong



"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About