From owner-freebsd-hackers@freebsd.org Fri Mar 3 22:42:42 2017 Return-Path: Delivered-To: freebsd-hackers@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 E1779CF683D for ; Fri, 3 Mar 2017 22:42:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 AE1AF1C48 for ; Fri, 3 Mar 2017 22:42:42 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id s67so13865315pgb.1 for ; Fri, 03 Mar 2017 14:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cnpOiK1ytIKRimUN65Ll4j45j/e2JW3Q5K0Rd5WGhrk=; b=BFYvhjxgoiZa7ETiHOm6BwSJbgYbm45a8VtiY9Y4Cfl88CuNdkC5zWLuu63hw412OF xnfyhejeBH0VGnwAbkWiAGWlyIv1c6PwlL9N9OZHrr0YU7oqsxsWnz7HU5NhzB80ARhC t0Ymu2u2RjaympWAZwifvvr4e48+chT361YLsBD/CoKJi5xvECm6bLknTk8mat/NWbYD 1lTE8LM5MXLY1bM4aDkB7dffLMpwiOQWy1i0rWVKnMdV9RFuWoJF2UYC4PcWEBiHBiWI AjdueAj2ZCVPhWeyhdtwbmTwI0ERmTWJRVZX2KG2U9f2qDsFdGlSW524QavesvJMXZlX 8ntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cnpOiK1ytIKRimUN65Ll4j45j/e2JW3Q5K0Rd5WGhrk=; b=pN5x/4/I5e3tkgpDwb2gh4bxuDBw3weQGPJ4qvfmbVK9gZFeltZ+AAwoetBIho1QoI rBswMih+jlSDIMxkP/jHJISlyCcw5H94TlA1hD/M+FAmSAHAz1Zorr66c/BKiBDsfOfK zGenIVNvUHmeap0OoIMWEsotedkpBnqx9p0D4aCJUgZzqB0/mVsHjhfaPkjNEHhJicVd 2LWlQXHnhDkpVbctjbvBGjpcj8tYaSnJ8b5dyG3gbT5SQEhh9TXc5VgBDxVjdCBMjxOw skY6Oh2F/KRuQTu4M5DZaVwbMo8+QWfEQLULag6OkpNIBhhhgdWTANvA0UTZzACaXcdQ tKmw== X-Gm-Message-State: AMke39kEXukKIDR2Vf6N9dOKoO/UI0JYKBv44pvf7eVkEcgK09sEvdX7sW4ApKW2w997+w== X-Received: by 10.99.144.73 with SMTP id a70mr6222405pge.187.1488580962039; Fri, 03 Mar 2017 14:42:42 -0800 (PST) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e13sm25433344pgf.48.2017.03.03.14.42.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Mar 2017 14:42:41 -0800 (PST) Subject: Re: kill -0 --- side effect or supported Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1FCA6944-FF7B-4140-99D2-CE5A1AACB067"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703032230.v23MUg5b072955@pdx.rh.CN85.dnsmgr.net> Date: Fri, 3 Mar 2017 14:42:40 -0800 Cc: Dirk-Willem van Gulik , freebsd-hackers@freebsd.org Message-Id: <35C6F2AA-309E-4D58-8191-AB99F0195BEC@gmail.com> References: <201703032230.v23MUg5b072955@pdx.rh.CN85.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 22:42:43 -0000 --Apple-Mail=_1FCA6944-FF7B-4140-99D2-CE5A1AACB067 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 3, 2017, at 14:30, Rodney W. Grimes = wrote: >=20 > -- Start of PGP signed section. > [ Charset UTF-8 unsupported, converting... ] >>=20 >>> On Mar 3, 2017, at 14:12, Dirk-Willem van Gulik = wrote: >>>=20 >>> I regularly use 'kill -0 ' on FreeBSD as a way to test if a = certain process is still running (but without actually sending the = signal). And I think it has worked reliably since the mid 80's. >>>=20 >>> Is it actually a properly supported use - as I recently happened to = notice that it does not seem to be all that documented in kill( >>=20 >> It better work. I have code that relies on it :)? >>=20 >> It does work as you noted, according to truss: >>=20 >> # sudo truss -ff kill -0 1 2>&1 >> ... >> 79940: kill(1,0) =3D 0 (0x0) >> ? >> # >>=20 >> As noted in kill(2), this is one of the valid values: >>=20 >> a group of processes. The sig argument may be one of the signals >> specified in sigaction(2) or it may be 0, in which case error = checking is > ^^^^^^^^^^^^^^^^ >=20 > That bit of information should be promoted from kill(2) to kill(1) by > adding 0 to the list as ?. Actually=E2=80=A6 it is mentioned in kill(1) =E2=80=94 you just have to = read between the lines: -signal_number A non-negative decimal integer, specifying the signal to be = sent instead of the default TERM. 0 is technically a non-negative real number. It might be a good idea to clarify this point/behavior by pointing to = kill(2) for the signal behavior/description noted above. Thanks, -Ngie --Apple-Mail=_1FCA6944-FF7B-4140-99D2-CE5A1AACB067 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYufFgAAoJEPWDqSZpMIYVfL0QAMIt8yKXvrChGbPR/LeWkPhf n4p8+JLgcFyoDNIpr/LEUHAdCK8NWxAwY+ZmHaP95zs5txGpde1hU4QUnXsxoNu7 c8z57PESnczQBViHQhCgL7XDVodV7GWdL4Xm/0mNgFE5BsDYia0+0XbLl0Kj93yI /drwWGvEygnwYa6uZpDugJaP546Ng/d4izYY3HnvVWMRsi4WphNZs7SYfbPOMUdP an7CxvcXe/YGKd0sZVHq7Pkej1W/nWEFZJHCQ+AbrriwaHkCNpCBYJrYdsYCtrce P9ssIEj75f2tpn1O/Ybf5f8HwcBDFxG/zXnxI+/M5ZH1XlVSmSM3hO3gPNK9/PAO xjLMmOrrVlxCbKxnDiIiWhPQBSNpwzYgWUi6zDqrIOdhKc7z8NCykQUqrdfwQozm dLgtq9y1vTmSPeIYcdR1J1MD3y71l0/BaqJeBpNwgJa6fu3H2RUAwnlF0LGY2J0A FAErVi6allBejHKx+MEXBzerFO9PI8GLH/st8fX1BlrSRqsSe0BHz6x38TO8RXUK utnyFEKCLkzwUMp1Nfng+jAZheNKSoSPisX5TLPUsE7lDypmaVbY8inlVGH3/Q76 qOK2HJMhO3RXGBQhDiQUitbYkl4azuUCkObICTVR6b/OtrFtGnrSExS7dNErvv2S 0KCuaAuIM6H1etOW880J =YB3I -----END PGP SIGNATURE----- --Apple-Mail=_1FCA6944-FF7B-4140-99D2-CE5A1AACB067--