Problem stopping a program

Danny Pansters danny at ricin.com
Thu Mar 30 01:01:04 UTC 2006


On Wednesday 29 March 2006 04:31, Paul Schmehl wrote:
> I'm working on a new port that uses a tcl script in daemon mode.  I've
> written an rc.d script to start and stop the daemon, and I'm having a
> problem stopping the daemon.  If I do it immediately, it stops just fine,
> but if I leave the daemon running for a while, I cannot.  (The daemon
> spawns two child processes after it's started.)
>
> Here's an example:  /usr/local/etc/rc.d/sguild.sh restart
> Stopping sguild
> Waiting for PIDS: 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558
> 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554
> 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559,
> 4554 4558 4559,
>
> This will go on indefinitely.  If I kill the process and then try
> restarting again, the child processes are gone, but the parent process is
> not.

Try pkill/pgrep (p=parent) ?

HTH,

Dan


More information about the freebsd-ports mailing list