From owner-freebsd-questions Wed May 16 2: 4:54 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gekko.i-clue.de (server.ms-agentur.de [62.153.134.194]) by hub.freebsd.org (Postfix) with ESMTP id 13EFD37B424 for ; Wed, 16 May 2001 02:04:50 -0700 (PDT) (envelope-from so@server.i-clue.de) Received: from i-clue.de (automatix.i-clue.de [192.168.0.112]) by gekko.i-clue.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id LAA25189; Wed, 16 May 2001 11:12:09 +0200 Message-ID: <3B024314.5020407@i-clue.de> Date: Wed, 16 May 2001 11:06:28 +0200 From: Christoph Sold Organization: i-clue GmbH, Waiblingen, Germany User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9) Gecko/20010505 X-Accept-Language: de, en MIME-Version: 1.0 To: parv Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to kill fetch -a ? References: <20010515231046.A4368@moo.holy.cow> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > > 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