Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2001 11:06:28 +0200
From:      Christoph Sold <so@server.i-clue.de>
To:        parv <parv_@yahoo.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to kill fetch -a <url>?
Message-ID:  <3B024314.5020407@i-clue.de>
References:  <20010515231046.A4368@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
parv wrote:

> once i was trying to fetch some file w/ -a option; after waiting
> for sometime (hours on a <33kbs connection) when i tried to 
> 
> # kill -9 <pid of fetch>
> 
> old fetch process would die but will start a new one w/ new pid. even
> tried to use killall and to delete the file being downloaded w/ no 
> success.
> 
> i could kill the fetch process only after killing ppp completely not 
> just sending -SIGINT to ppp.
> 
> man page says fetch(1) will retry the transfer upon /soft failures/. 
> fetch seemed to have very hard definition of soft.
> 
> is there any way to kill "fetch -a blah" without killing ppp?


fetch starts child processess for each file and subdirectory to fetch. 
Just kill the parent process to kill all the childs, too. To locate the 
parent process, have a look at the output of  ps -j:

USER   PID  PPID  PGID   SESS JOBC STAT  TT       TIME COMMAND
so   71054 71053 71054 15c7a80    0 Ss    p0    0:00.10 -bash (bash)
so   71068 71054 71068 15c7a80    1 R+    p0    0:00.00 ps j

The PPID field lists the parent process for each running process. In 
this example, the PPID of the ps j line equals the PID of the -bash 
line. Thus, if you kill that bash, its child (ps) would die, too.

HTH
-Christoph Sold


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B024314.5020407>