Search the web
Sign In
New User? Sign Up
Perl_Official · Perl . CGI . Shell script
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Regarding killing process   Message List  
Reply | Forward Message #2033 of 2062 |
[Perl] Re: Regarding killing process

--- In Perl_Official@yahoogroups.com, avinash k <avik1612@...> wrote:
>
> hi,
>
> i am using the unix opearting system.
> I have attached the code
> It is still not able to kill the process
>
> Thanks in advance
> Avinash

The code may have gotten stripped as a "non-text attachment". Try
pasting the relevant portion(s) in-line.

A few things could keep you from being able to kill processes:

* "kill" is not in your path - try running "kill -l" from a command
line, it should result in a list of signals.
* You do not have permission to kill the process being attempted -
modify your script to print the kill statements and try running them
manually.
* You are not providing a process ID - This is going to depend what
you think is in @pid, what is actually in @pid, and what you think is
in $_ and what is actually in $_. Print is your friend in this case.
Or you can learn the perl debugger (a wonderful tool!) and inspect
your variables around the kill statement.
* You should check $? for the status of the `` command to see how it
exited.





Tue Aug 14, 2007 2:21 pm

rob_wilson_98
Offline Offline

Forward
Message #2033 of 2062 |
Expand Messages Author Sort by Date

hi, i am trying this statement but it is not executing i.e. killing process $force ="-9"; print "Kill $force $pid[$_]\n"; Thanks and Regards Avinash ... Get...
avinash k
avik1612
Offline Send Email
Aug 10, 2007
12:02 am

... process ... All your script would do is print out a Kill message. It will not execute the Kill command. In fact, I am not aware of a "Kill" command. If...
rob_wilson_98
Offline
Aug 10, 2007
2:13 pm

hi, i am using the unix opearting system. I have attached the code It is still not able to kill the process Thanks in advance Avinash ... process ... All your...
avinash k
avik1612
Offline Send Email
Aug 13, 2007
3:39 pm

... The code may have gotten stripped as a "non-text attachment". Try pasting the relevant portion(s) in-line. A few things could keep you from being able to...
rob_wilson_98
Offline
Aug 14, 2007
2:22 pm

Avinash, The last suggestion which surrounded the kill command with grave accents (`kill -9 PID`) was essentially causing perl to spawn a process and running...
Glen
glen_brydon
Offline Send Email
Aug 14, 2007
3:43 pm

... Glen> The last suggestion which surrounded the kill command with grave Glen> accents (`kill -9 PID`) was essentially causing perl to spawn a Glen> process...
merlyn@...
merlynstoneh...
Offline Send Email
Aug 14, 2007
5:59 pm

hi, i am killing all the process that are displayed using the ps command. but doing that the particular unix session also terminates. so how to prevent the...
avinash k
avik1612
Offline Send Email
Aug 16, 2007
11:07 pm

try this `kill $force $pid[$_]`; ... -- Kind Regards Dhanapalan.C " If there is a way, I will find one, If there is none,I will make one.... !!! " [Non-text...
dp
dhana_foru
Offline Send Email
Aug 10, 2007
6:19 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help