[issue44597] Poll returns POLLOUT on Pipe read endpoint on MacOS 10.14

2021-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Without having looked at this issue in detail...

This looks like an issue with macOS and not Python. In general API's providing 
access to system calls are just thin wrappers around those system calls.  If 
this is a bug in macOS there's nothing we can do about this, other than perhaps 
working around the bug in stdlib usages of select.poll.

--

___
Python tracker 

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



[issue44597] Poll returns POLLOUT on Pipe read endpoint on MacOS 10.14

2021-07-10 Thread Sam Harding


New submission from Sam Harding :

The behaviour of select.poll() is inconsistent across MacOS versions, on MacOS 
Mojave (10.14.6) registering and polling the receiving channel of 
mp.Pipe(duplex=False) returns the event POLLOUT (ready to write to). This is 
verified by a colleagues setup.

Whereas on MacOS 11 the same scenario will not have poll() return that the 
receiving channel is ready for writing to (POLLOUT). 

Example:
###
import select
import multiprocessing as mp
recv_end, send_end = mp.Pipe(duplex=False)
poll = select.poll()
poll.register(recv_end)
print(poll.poll(1000))
###

MacOS 10.14.6 Result: 
> [(3,4)]

MacOS 11.0.1 Result:
> []

I am assuming that the MacOS 11 behaviour is should be the expected behaviour, 
and that the recv connection from a Pipe should never return that it is 
writable.

This was tested with Python 3.9.4, and 3.7.6.

--
components: Extension Modules, macOS
messages: 397246
nosy: ned.deily, ronaldoussoren, samh42
priority: normal
severity: normal
status: open
title: Poll returns POLLOUT on Pipe read endpoint on MacOS 10.14
type: behavior
versions: Python 3.7, Python 3.9

___
Python tracker 

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