From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 16 08:48:11 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A9AF16A422 for ; Fri, 16 Dec 2005 08:48:11 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DB8E43DD6 for ; Fri, 16 Dec 2005 08:46:53 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (kdqted@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id jBG8kabq099406; Fri, 16 Dec 2005 09:46:37 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id jBG8kaEB099405; Fri, 16 Dec 2005 09:46:36 +0100 (CET) (envelope-from olli) Date: Fri, 16 Dec 2005 09:46:36 +0100 (CET) Message-Id: <200512160846.jBG8kaEB099405@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, "roma.a.g" In-Reply-To: <14510301213.20051216105225@gmail.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-STABLE (i386)) Cc: Subject: Re: easy question about kill command X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, "roma.a.g" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 08:48:11 -0000 roma.a.g wrote: > Is there anyone who can explain me, why when i say 'kill -HUP id', > and its failed to restart, kill say nothing? Because the kill command has no way to know about it. The kill command only instructs the kernel to deliver a signal to a process (or to a process group). The only feedback it gets from the kernel is whether the target process exists or not. (The latter is often used to check for the existence of a particular process ID, by trying to send it a "zero" signal which does nothing.) There is no way for the kill command to know what the target process is going to do with the signal. This is entirely and only the business of the target process, which might chose to take the default action (in the case of SIGHUP it's to terminate the process), to ignore the signal alltogether, or to take some special action. Some programs use SIGHUP traditionally to rotate their logfiles, re-read configuration files, re-open network sockets, restart themselves, or other things. But that's entirely up to the program in question, and there is no way the kill command could know about it, let alone whether it was successful or not. > It is such an easy to implement... I don't think so, as explained above. But if you think it is easy, you're certainly free to write a patch and submit it for discussion. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "What is this talk of 'release'? We do not make software 'releases'. Our software 'escapes', leaving a bloody trail of designers and quality assurance people in its wake."