From owner-freebsd-questions@FreeBSD.ORG Fri Oct 27 19:12:01 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2447916A47B for ; Fri, 27 Oct 2006 19:12:01 +0000 (UTC) (envelope-from arcade@synergetica.dn.ua) Received: from nora.synergetica.dn.ua (synergetica.dn.ua [82.207.115.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A08843D46 for ; Fri, 27 Oct 2006 19:11:59 +0000 (GMT) (envelope-from arcade@synergetica.dn.ua) Received: from [172.30.0.159] (yarn.lan [172.30.0.159]) (authenticated bits=0) by nora.synergetica.dn.ua (8.13.8/8.13.8) with ESMTP id k9RJBuQN014247 for ; Fri, 27 Oct 2006 22:11:57 +0300 (EEST) (envelope-from arcade@synergetica.dn.ua) Message-ID: <454259FB.4020009@synergetica.dn.ua> Date: Fri, 27 Oct 2006 22:11:55 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.8.0.7) Gecko/20061019 SeaMonkey/1.0.5 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: rc.subr question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2006 19:12:01 -0000 I'm writing a custom script to start a linux daemon with LinuxThreads. The script starts daemon nicely, but on stopping it shows: Stopping fmsadmin. kill: 19790: No such process This happens because all processes are actually threads and signalling one process is as good as signalling them all. But with this error wait_for_pids doesn't work which results in: yehat# /usr/local/etc/rc.d/fmsadmin restart Stopping fmsadmin. kill: 19790: No such process fmsadmin already running? (pid=19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19791 19792 19793 19794 19795 19796 19797 19926 19927). What is the right way to describe such daemon in rc script? The daemon doesn't create any pid files and killing one of active processes does the thing. -- Sphinx of black quartz judge my vow!