Current location: Hot Scripts Forums » Programming Languages » Perl » How to stop a perl script from running


How to stop a perl script from running

Reply
  #1 (permalink)  
Old 10-19-06, 03:34 AM
weilies weilies is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
How to stop a perl script from running

hi, my question is...

How to stop a perl script (a.pl) from running if the a.pl is currently in running state

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-19-06, 05:20 AM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by weilies
hi, my question is...

How to stop a perl script (a.pl) from running if the a.pl is currently in running state

thanks
1) Locate the PID from the command line (TOP Command UNIX/LINUX)
2) issue "kill -9 PID #" command
3) If you are running this on a WIN XP machine, it is a totaly different ball-game, but there exist a quite efficient manner to do so.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-20-06, 03:27 AM
weilies weilies is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the reply, but i think what i need, is not kill the first a.pl, but not to start the second a.pl while the first a.pl is running

I need to make sure

1. the first a.pl is running complete
2. only one a.pl can run in server at one time

Thanks anyway
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 10-20-06, 11:59 AM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by weilies
Thanks for the reply, but i think what i need, is not kill the first a.pl, but not to start the second a.pl while the first a.pl is running

I need to make sure

1. the first a.pl is running complete
2. only one a.pl can run in server at one time

Thanks anyway
Then what you will want to read about is "Perl Fork" on google.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with my largest perl script. Grabbing data from a file. Sunnmann Perl 2 04-23-08 04:27 AM
Execute a perl script from another perl script. jkarimi Perl 3 09-07-05 12:42 AM
Long Executed Perl Script not terminating till completion ! learner Perl 7 09-04-05 01:39 AM
converting perl script to php help!! macruddace Perl 1 04-14-05 03:38 PM
Is there any integrity of script rankings? webmaster@atmanager.com Hot Scripts Forum Questions, Suggestions and Feedback 17 08-06-04 01:12 AM


All times are GMT -5. The time now is 07:03 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.