Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2011 20:12:02 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   [PATCH] fix impossible case with waitpid(2) in truss
Message-ID:  <AANLkTinWcf-Y6=O3MkEwMkN6_E=jos8y2_mrw3Y1ouHa@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000e0ce0d740db28ea049c4a5daa
Content-Type: text/plain; charset=ISO-8859-1

Hi,
    waitpid(2) returns a value in the set { -1, 0, <pid> } (-1 in the
event of an ERROR, 0 when WNOHANG is specified, <pid> when the process
exits according to wait(2)); it never returns a value < -1.
    If someone could commit this patch it would be appreciated.
Thanks,
-Garrett

--000e0ce0d740db28ea049c4a5daa
Content-Type: text/x-patch; charset=US-ASCII;
	name="impossible-waitpid-case.patch"
Content-Disposition: attachment; filename="impossible-waitpid-case.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gk6amrik0

SW5kZXg6IHVzci5iaW4vdHJ1c3Mvc2V0dXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmluL3RydXNz
L3NldHVwLmMJKHJldmlzaW9uIDIxODY4OSkKKysrIHVzci5iaW4vdHJ1c3Mvc2V0dXAuYwkod29y
a2luZyBjb3B5KQpAQCAtODMsNyArODMsNyBAQAogCX0KIAkKIAkvKiBPbmx5IGluIHRoZSBwYXJl
bnQgaGVyZSAqLwotCWlmICh3YWl0cGlkKHBpZCwgJndhaXR2YWwsIDApIDwgLTEpIHsKKwlpZiAo
d2FpdHBpZChwaWQsICZ3YWl0dmFsLCAwKSA9PSAtMSkgewogCQllcnIoMSwgInVuZXhwZWN0IHN0
b3AgaW4gd2FpdHBpZCIpOwogCQlyZXR1cm4gMDsKIAl9Cg==
--000e0ce0d740db28ea049c4a5daa--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinWcf-Y6=O3MkEwMkN6_E=jos8y2_mrw3Y1ouHa>