Date: Mon, 22 Aug 2016 13:55:45 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 212048] waitpid returns uninitialized status when WNOHANG option is used Message-ID: <bug-212048-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212048 Bug ID: 212048 Summary: waitpid returns uninitialized status when WNOHANG option is used Product: Base System Version: 10.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: caseylucas@gmail.com When the WNOHANG option is used with waitpid, uninitialized memory is retur= ned in the 'status' result if no child process is available. This was first noticed when the return value from Python os.waitpid was trashed / unreliab= le. See 'status' variable in kern_exit.c::sys_wait4 Demonstration of problem: https://gist.github.com/caseylucas/df2eea85741ea892328c3f8c558cfa75 Stackoverflow reference: http://stackoverflow.com/questions/38984449/is-status-value-from-os-waitpid= -unreliable-when-os-wnohang-is-used-under-freebsd --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212048-8>