Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18343ab

Browse files
Improve signal documentation (GH-14274)
* add a missing ``.. availability::`` reST explicit markup; * more consistent "see man page" sentences. (cherry picked from commit cfebfef) Co-authored-by: Géry Ogam <[email protected]>
1 parent 4969192 commit 18343ab

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

Doc/library/signal.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The variables defined in the :mod:`signal` module are:
9595

9696
All the signal numbers are defined symbolically. For example, the hangup signal
9797
is defined as :const:`signal.SIGHUP`; the variable names are identical to the
98-
names used in C programs, as found in ``<signal.h>``. The Unix man page for
98+
names used in C programs, as found in ``<signal.h>``. The Unix man page for
9999
':c:func:`signal`' lists the existing signals (on some systems this is
100100
:manpage:`signal(2)`, on others the list is in :manpage:`signal(7)`). Note that
101101
not all systems define the same set of signal names; only those names defined by
@@ -193,10 +193,10 @@ The :mod:`signal` module defines the following functions:
193193
canceled (only one alarm can be scheduled at any time). The returned value is
194194
then the number of seconds before any previously set alarm was to have been
195195
delivered. If *time* is zero, no alarm is scheduled, and any scheduled alarm is
196-
canceled. If the return value is zero, no alarm is currently scheduled. (See
197-
the Unix man page :manpage:`alarm(2)`.)
196+
canceled. If the return value is zero, no alarm is currently scheduled.
198197

199-
.. availability:: Unix.
198+
.. availability:: Unix. See the man page :manpage:`alarm(2)` for further
199+
information.
200200

201201

202202
.. function:: getsignal(signalnum)
@@ -213,8 +213,10 @@ The :mod:`signal` module defines the following functions:
213213
.. function:: pause()
214214

215215
Cause the process to sleep until a signal is received; the appropriate handler
216-
will then be called. Returns nothing. Not on Windows. (See the Unix man page
217-
:manpage:`signal(2)`.)
216+
will then be called. Returns nothing.
217+
218+
.. availability:: Unix. See the man page :manpage:`signal(2)` for further
219+
information.
218220

219221
See also :func:`sigwait`, :func:`sigwaitinfo`, :func:`sigtimedwait` and
220222
:func:`sigpending`.
@@ -237,8 +239,8 @@ The :mod:`signal` module defines the following functions:
237239
If *signalnum* is 0, then no signal is sent, but error checking is still
238240
performed; this can be used to check if the target thread is still running.
239241

240-
.. availability:: Unix (see the man page :manpage:`pthread_kill(3)` for further
241-
information).
242+
.. availability:: Unix. See the man page :manpage:`pthread_kill(3)` for further
243+
information.
242244

243245
See also :func:`os.kill`.
244246

@@ -268,7 +270,7 @@ The :mod:`signal` module defines the following functions:
268270
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
269271
signal mask of the calling thread.
270272

271-
.. availability:: Unix. See the man page :manpage:`sigprocmask(3)` and
273+
.. availability:: Unix. See the man page :manpage:`sigprocmask(3)` and
272274
:manpage:`pthread_sigmask(3)` for further information.
273275

274276
See also :func:`pause`, :func:`sigpending` and :func:`sigwait`.
@@ -355,8 +357,8 @@ The :mod:`signal` module defines the following functions:
355357
calls will be restarted when interrupted by signal *signalnum*, otherwise
356358
system calls will be interrupted. Returns nothing.
357359

358-
.. availability:: Unix (see the man page :manpage:`siginterrupt(3)`
359-
for further information).
360+
.. availability:: Unix. See the man page :manpage:`siginterrupt(3)`
361+
for further information.
360362

361363
Note that installing a signal handler with :func:`signal` will reset the
362364
restart behaviour to interruptible by implicitly calling
@@ -369,7 +371,7 @@ The :mod:`signal` module defines the following functions:
369371
be a callable Python object taking two arguments (see below), or one of the
370372
special values :const:`signal.SIG_IGN` or :const:`signal.SIG_DFL`. The previous
371373
signal handler will be returned (see the description of :func:`getsignal`
372-
above). (See the Unix man page :manpage:`signal(2)`.)
374+
above). (See the Unix man page :manpage:`signal(2)` for further information.)
373375

374376
When threads are enabled, this function can only be called from the main thread;
375377
attempting to call it from other threads will cause a :exc:`ValueError`
@@ -395,8 +397,8 @@ The :mod:`signal` module defines the following functions:
395397
thread (i.e., the signals which have been raised while blocked). Return the
396398
set of the pending signals.
397399

398-
.. availability:: Unix (see the man page :manpage:`sigpending(2)` for further
399-
information).
400+
.. availability:: Unix. See the man page :manpage:`sigpending(2)` for further
401+
information.
400402

401403
See also :func:`pause`, :func:`pthread_sigmask` and :func:`sigwait`.
402404

@@ -409,8 +411,8 @@ The :mod:`signal` module defines the following functions:
409411
signals specified in the signal set *sigset*. The function accepts the signal
410412
(removes it from the pending list of signals), and returns the signal number.
411413

412-
.. availability:: Unix (see the man page :manpage:`sigwait(3)` for further
413-
information).
414+
.. availability:: Unix. See the man page :manpage:`sigwait(3)` for further
415+
information.
414416

415417
See also :func:`pause`, :func:`pthread_sigmask`, :func:`sigpending`,
416418
:func:`sigwaitinfo` and :func:`sigtimedwait`.
@@ -434,8 +436,8 @@ The :mod:`signal` module defines the following functions:
434436
:attr:`si_errno`, :attr:`si_pid`, :attr:`si_uid`, :attr:`si_status`,
435437
:attr:`si_band`.
436438

437-
.. availability:: Unix (see the man page :manpage:`sigwaitinfo(2)` for further
438-
information).
439+
.. availability:: Unix. See the man page :manpage:`sigwaitinfo(2)` for further
440+
information.
439441

440442
See also :func:`pause`, :func:`sigwait` and :func:`sigtimedwait`.
441443

@@ -453,8 +455,8 @@ The :mod:`signal` module defines the following functions:
453455
specifying a timeout. If *timeout* is specified as :const:`0`, a poll is
454456
performed. Returns :const:`None` if a timeout occurs.
455457

456-
.. availability:: Unix (see the man page :manpage:`sigtimedwait(2)` for further
457-
information).
458+
.. availability:: Unix. See the man page :manpage:`sigtimedwait(2)` for further
459+
information.
458460

459461
See also :func:`pause`, :func:`sigwait` and :func:`sigwaitinfo`.
460462

0 commit comments

Comments
 (0)