Cynosure.X International LLC

: :

Add Comment | Related Links | TrackBack
Related Content

KillMyProc.sh (GPL)

A while back, I posted KillProc.sh on this site. It allows you to kill a process by name. However, it kills the first process that it finds in the process list. And that first process could belong to another owner, which you are not allowed to kill. KillProc.sh is excellent if you are the only user on a system or if you are 'root'. But it does miserably on a shared hosting server where there are many different users. So I've written this KillMyProc.sh.

KillMyProc.sh is a Bourne shell script that allows you to kill a process (you own) by name, rather than the process ID. You can use KillMyProc.sh to kill off multiple distinct processes on a single command line. However, it will only kill the first instance of the specified process it finds in the process list. (See KillMyProcs.sh for a script that kills all instances of a process name.)

KillMyProc.sh takes advantage of the Token.sh (GPL) Bourne shell script that is also available on this site. So to use KillMyProc.sh, you will need to download the Token.sh script if you don't already have it.

KillMyProc.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

  KillMyProc.sh "proc name 1" [ . . . "proc name 2" ]

Attached File: KillMyProc.sh (583 B)

Chieh Cheng
Fri, 22 Feb 2008 01:47:08 +0000

The first version of KillMyProc.sh is a little too restrictive. It only kills the process if its name is at the beginning of the process list entry. So if you start a process with full path, KillMyProc.sh will not find it.

In this newer version of KillMyProc.sh, I have changed that. KillMyProc.sh now kills the first process in the list that contains the proc name string.

Attached File: 1 - KillMyProc.sh (587 B)

Chieh Cheng
Tue, 25 Mar 2008 17:59:46 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 2 + 8?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

50 Users Online

Hacking Digital Cameras
Fun for Photographers



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.