[issue21791] Proper return status of os.WNOHANG is not always (0, 0)

2014-06-17 Thread Eric Radman

New submission from Eric Radman:

The documentation for the WNOHANG flag 
(https://docs.python.org/3.4/library/os.html#os.WNOHANG) suggests that a return 
value of (0, 0) indicates success. This is not always true, the second value 
may contain a value even on success. On OpenBSD 5.5 this is an exaple status of 
a process that is still running:

pid, status = os.waitpid(pid, os.WNOHANG)
(0, -168927460)

It would be more accurate to say that if pid==0 then the process is running and 
that status is platform dependent.

--
assignee: docs@python
components: Documentation
messages: 220843
nosy: docs@python, eradman
priority: normal
severity: normal
status: open
title: Proper return status of os.WNOHANG is not always (0, 0)
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 
<http://bugs.python.org/issue21791>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21791] Proper return status of os.WNOHANG is not always (0, 0)

2015-05-13 Thread Eric Radman

Eric Radman added the comment:

Thanks for posting some simple examples. 

Here is the commit that I wrote to solve this problem when I encountered it in 
the wild:

https://bitbucket.org/tk0miya/testing.postgresql/commits/3f145860cfd91e3f03f24b87c4b3b41c3a974037

Closing since I am also not able to reproduce this using a simple example.

--
resolution:  -> works for me
status: pending -> closed

___
Python tracker 
<http://bugs.python.org/issue21791>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com