11 Commits
Author SHA1 Message Date
Jeong, YunWon 7c4017b3d8 Retry select/poll/fcntl on EINTR and add kqueue (#8721)
* Retry select/poll/fcntl on EINTR

select() no longer shares one empty list for r/w/x and now
calls select(2) even with empty sets so the timeout elapses.
poll() rejects type instantiation, treats float timeout as
milliseconds, and raises RuntimeError on concurrent poll().
fcntl, ioctl, flock, and lockf retry after EINTR.

Assisted-by: Grok:grok-4.6

* Add select.kqueue and select.kevent

Expose kqueue(2)/kevent(2) on BSD and macOS, including
control() EINTR retry and marking open kqueue objects
closed after fork.

Assisted-by: Grok:grok-4.6

* Add login_tty and fix termios/syslog/mmap

termios.error is Exception, not OSError.
os.login_tty prepares a tty for a new session.
syslog.openlog encodes ident as UTF-8.
mmap.seek returns the new position.

Assisted-by: Grok:grok-4.6

* Honor mmap trackfd on Unix

When trackfd is false, do not keep a duplicated file
descriptor. size() then fails with EBADF and resize()
raises ValueError.

Assisted-by: Grok:grok-4.6

* address review: portable kevent and kqueue close

Build kevent values by field assignment so FreeBSD's
ext array compiles. Normalize timespec nanoseconds,
keep the kqueue fd live across control(), reinit the
open list lock after fork, make trackfd keyword-only,
and skip login_tty on Solaris/illumos.

Assisted-by: Grok:grok-4.6

(cherry picked from commit 0ba7048ac9)
Assisted-by: Codex:gpt-6
2026-09-17 01:33:13 +09:00
Shahar Naveh da99e72771 Update test_sys{log,_settrace}.py to 3.14.5 (#8030)
* Update `test_syslog.py` to 3.14.5

* Update `test_sys_settrace.py` to 3.14.5
2026-06-03 22:51:41 +09:00
Jeong, YunWon bf588b3c4e more hostenv impl (#7604) 2026-05-16 19:01:40 +09:00
Jeong, YunWon 5d68313f91 sys.setswitchinterval (#5817) 2025-06-22 22:36:13 +09:00
Jeong YunWon 75aefb89fd Mark newly failing tests 2023-02-25 23:00:51 +09:00
CPython Developers a3e60af35e Update test_syslog from CPython 3.11.2 2023-02-25 23:00:51 +09:00
Jeong YunWon 01a5355713 Update test_syslog from CPython 3.10.5 2023-02-25 23:00:51 +09:00
Jeong YunWon abcb93d0bd test_syslog crlf -> lf 2023-02-25 23:00:50 +09:00
Dean Li 6f98288e84 test: use import_helper 2021-11-29 21:03:02 +08:00
snowapril 358bf1e562 add expected failure on fail test
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-09-18 01:42:46 +09:00
snowapril c6a261085d add test_syslog.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-09-18 01:42:46 +09:00