https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212048

            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: [email protected]
          Reporter: [email protected]

When the WNOHANG option is used with waitpid, uninitialized memory is returned
in the 'status' result if no child process is available.  This was first
noticed when the return value from Python os.waitpid was trashed / unreliable.

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to