From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Sun, 6 Apr 2003 14:03:08 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 92 ************************************************** Saturday 05 April 2003 Number 92 ************************************************** Subjects for today 1 Re: killproc : John Poltorak 2 Re: killproc : Dave and Natalie" **= Email 1 ==========================** Date: Sun, 6 Apr 2003 12:20:48 +0100 From: John Poltorak Subject: Re: killproc On Fri, Apr 04, 2003 at 04:58:17PM -0300, DoC wrote: > John Poltorak wrote: > > >I've just been looking at a shell script which uses 'killproc' to > >terminate a running process, but I can't work our what killproc actually > >is... > > > >Could it be a builtin function of /bin/sh ? > > > > > > > > > Look in /etc/init.d/functions. It's a simple routine to kill processes > using the 'kill' command. Thanks, for pointing that out. What I don't understand is how this routine is located... killproc is a function within the functions shell script, but it isn't on the path, and even if it was how would the calling program know it was a routine in a shell script rather than the name of an executable file? > -- DoC -- John **= Email 2 ==========================** Date: Sun, 06 Apr 2003 17:22:36 -0800 From: "Dave and Natalie" Subject: Re: killproc On Sun, 6 Apr 2003 12:20:48 +0100, John Poltorak wrote: >> John Poltorak wrote: >> >> >I've just been looking at a shell script which uses 'killproc' to >> >terminate a running process, but I can't work our what killproc actually >> >is... >> > >> >Could it be a builtin function of /bin/sh ? >> > >> > >> > >> > >> Look in /etc/init.d/functions. It's a simple routine to kill processes >> using the 'kill' command. > >Thanks, for pointing that out. > >What I don't understand is how this routine is located... > >killproc is a function within the functions shell script, but it isn't on >the path, and even if it was how would the calling program know it was a >routine in a shell script rather than the name of an executable file? > Where did you get the shell script? I hunted around for killproc here and only found it in Redhat 5.0 at /etc/rc.d/init.d/functions. /etc/init.d contains scripts for starting, restarting and stopping daemons and it looks like that is where killproc is only used. At that from functions # functions This file contains functions to be used by most or all # shell scripts in the /etc/init.d directory. Debian has a binary /sbin/start-stop-daemon which is used for killing, restarting, etc init.d scripts. Dave ps Let me know if you want redhats functions script