From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 16 10:46:52 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 1323116A41F for ; Fri, 16 Dec 2005 10:46:51 +0000 (GMT) (envelope-from roma.a.g@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id A442A43D55 for ; Fri, 16 Dec 2005 10:46:50 +0000 (GMT) (envelope-from roma.a.g@gmail.com) Received: by uproxy.gmail.com with SMTP id o2so122783uge for ; Fri, 16 Dec 2005 02:46:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:x-mailer:reply-to:organization:x-priority:message-id:to:cc:subject:in-reply-to:references:mime-version:content-type:content-transfer-encoding; b=odT0FTGz6r2OFt9cI4oSvheg921/MfWqQPhgRwAyR25mgO7BN3XbO9ieSgp211LE9KVk4fCK8ZlM/kEbpzvR8UWWrQ3eE3kZmyHr92VRZzqFlaK7XbmlmizSi78+OuuIFvTcwlA3odUJYTiHSOiVM5yu9eCMEbsLv2v9r17RrLw= Received: by 10.67.27.13 with SMTP id e13mr658729ugj; Fri, 16 Dec 2005 01:07:18 -0800 (PST) Received: from pridep3.ad.office.acropolis.ru ( [81.211.90.3]) by mx.gmail.com with ESMTP id q40sm1086162ugc.2005.12.16.01.07.18; Fri, 16 Dec 2005 01:07:18 -0800 (PST) Date: Fri, 16 Dec 2005 12:08:16 +0300 From: "Roman Gorohov. " X-Mailer: The Bat! (v3.62.14) UNREG / CD5BF9353B3B7091 Organization: Acropolis X-Priority: 3 (Normal) Message-ID: <979057908.20051216120816@gmail.com> To: Oliver Fromme In-Reply-To: <200512160846.jBG8kaEB099405@lurza.secnetix.de> References: <14510301213.20051216105225@gmail.com> <200512160846.jBG8kaEB099405@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re[2]: easy question about kill command X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "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 10:46:52 -0000 Hi, Oliver. > 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. Thanks for your reply. My question was about standard bsd daemons, not about some apps with unpredictable behaviour. >> It is such an easy to implement... > I don't think so, as explained above. Yeah right, I see now. > Best regards > Oliver -- Best regards, Roman Gorohov mailto:roma.a.g@gmail.com