From owner-freebsd-rc@freebsd.org Fri Mar 11 08:57:49 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3C97ACAC6F for ; Fri, 11 Mar 2016 08:57:48 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C026CCF8 for ; Fri, 11 Mar 2016 08:57:48 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-ob0-x234.google.com with SMTP id fz5so107021689obc.0 for ; Fri, 11 Mar 2016 00:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:date:message-id:subject:from:to; bh=761clLDGh4i0b/LxYBNTwlD59debhDm0x8TfObyJ/Os=; b=UlV4t8nUjf2dfB62LSDLigjola2Mea7JXlsxSH3YnKtJ9evVE9rOUlAqy074w1Dpx8 DZ7XL9vAHFKV8GFRtg34n9XhastqihnlkxPxR9g4Bbw0Hk4t9tDJhfADAmpOq+OyJGr8 ae2VFXti9t/0bIGqOw7DeBVu9R11o98k4gLOA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=761clLDGh4i0b/LxYBNTwlD59debhDm0x8TfObyJ/Os=; b=IjUf/O/yxFBbaiVLllfIAttg4iE3OW8SsnRD/0w9sZIaJJUtM4mO2A7J4caGfleqw7 lWVU8h9xyp/iN3u6B8V/4iKuTzubzY0C8Ni8Z7+c/KmaQ/izMxKbrlkZUrq4LGTT4o+X lK+F5z10r9X0q31sOB5HAAAER4s6iEu9jHR4Q00C9Ki4fyNzxXW1dfdTbVUA5THj7C24 ctyj0fqGTOFZHJOvXorL1W68U9KbIzP6l/6ZCAqbc45iZKDkqwiqRQjREXd5NXC6RELI zfji4BZRFG/5RDssyyIf90R1ZyvFHDhM6mh9mLqFYJ+O928r3gNlKxEQrnfcsK8Ibw6W CsBg== X-Gm-Message-State: AD7BkJIXmBocMRY4jiE2SBmNRbVgvlCAXmnXrSt7fDMnxZpNqQALY+YjNzxS/2rGNHL3BZNPMAm9NHwlEmQftA== MIME-Version: 1.0 X-Received: by 10.60.150.163 with SMTP id uj3mr4741795oeb.67.1457686668075; Fri, 11 Mar 2016 00:57:48 -0800 (PST) Received: by 10.157.61.37 with HTTP; Fri, 11 Mar 2016 00:57:48 -0800 (PST) Date: Fri, 11 Mar 2016 01:57:48 -0700 Message-ID: Subject: pidfile for multiprocess daemons From: Kevin Bowling To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 08:57:49 -0000 Hi, I'd like some insight from somebody familiar with rc.subr on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207896. Zabbix uses SysV shared memory and semaphores to communicate between multiple processes. Those are cleaned up when the master process is SIGTERMed. So the obvious deficiency here was setting pidfile. Except pidfile still SIGTERMed all the children.. it seemed to still be using check_process to get all the PIDs on stop. So I added rc_pid in addition and it work as I expected. That seems strange as it's not documented and my read of the code indicates that pidfile was intended to be "enough". Any advice? Regards,