Skip to content

Commit 02659dd

Browse files
Fix various additional issues
1 parent fb180da commit 02659dd

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

Doc/library/os.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ Naturally, they are all only available on Linux.
45724572
- :const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)
45734573

45744574
If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide
4575-
real-time clock is used. If system clock is changed, timer setting need
4575+
real-time clock is used. If system clock is changed, timer setting needs
45764576
to be updated. To cancel timer when system clock is changed, see
45774577
:const:`TFD_TIMER_CANCEL_ON_SET`.
45784578

@@ -4592,8 +4592,8 @@ Naturally, they are all only available on Linux.
45924592

45934593
If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until
45944594
the timer expires. If it is set as a flag, :func:`read` doesn't block, but
4595-
If there hasn't been an expiration since the last call to read,
4596-
:func:`read` raises :class:`OSError` with ``errno`` is set to
4595+
if there hasn't been an expiration since the last call to read,
4596+
:func:`read` raises :class:`OSError` with ``errno`` set to
45974597
:const:`errno.EAGAIN`.
45984598

45994599
:const:`TFD_CLOEXEC` is always set by Python automatically.
@@ -4623,12 +4623,11 @@ Naturally, they are all only available on Linux.
46234623
- :const:`TFD_TIMER_CANCEL_ON_SET`
46244624

46254625
The timer is disabled by setting *initial* to zero (``0``).
4626-
If *initial* is equal to or greater than zero, the timer is enabled.
4626+
If *initial* is greater than zero, the timer is enabled.
46274627
If *initial* is less than zero, it raises an :class:`OSError` exception
4628-
with ``errno`` set to :const:`errno.EINVAL`
4628+
with ``errno`` set to :const:`errno.EINVAL`.
46294629

46304630
By default the timer will fire when *initial* seconds have elapsed.
4631-
(If *initial* is zero, timer will fire immediately.)
46324631

46334632
However, if the :const:`TFD_TIMER_ABSTIME` flag is set,
46344633
the timer will fire when the timer's clock
@@ -4639,7 +4638,7 @@ Naturally, they are all only available on Linux.
46394638
If *interval* is greater than zero, the timer fires every time *interval*
46404639
seconds have elapsed since the previous expiration.
46414640
If *interval* is less than zero, it raises :class:`OSError` with ``errno``
4642-
set to :const:`errno.EINVAL`
4641+
set to :const:`errno.EINVAL`.
46434642

46444643
If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with
46454644
:const:`TFD_TIMER_ABSTIME` and the clock for this timer is

Modules/clinic/posixmodule.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/posixmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11518,17 +11518,17 @@ os.timerfd_settime_ns
1151811518
flags: int = 0
1151911519
0 or a bit mask of TFD_TIMER_ABSTIME or TFD_TIMER_CANCEL_ON_SET.
1152011520
initial: long_long = 0
11521-
initial expiration timing in seconds.
11521+
initial expiration timing in nanoseconds.
1152211522
interval: long_long = 0
11523-
interval for the timer in seconds.
11523+
interval for the timer in nanoseconds.
1152411524

1152511525
Alter a timer file descriptor's internal timer in nanoseconds.
1152611526
[clinic start generated code]*/
1152711527

1152811528
static PyObject *
1152911529
os_timerfd_settime_ns_impl(PyObject *module, int fd, int flags,
1153011530
long long initial, long long interval)
11531-
/*[clinic end generated code: output=6273ec7d7b4cc0b3 input=261e105d6e42f5bc]*/
11531+
/*[clinic end generated code: output=6273ec7d7b4cc0b3 input=94bdcea7292157eb]*/
1153211532
{
1153311533
struct itimerspec new_value;
1153411534
struct itimerspec old_value;

0 commit comments

Comments
 (0)