mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-82616: Add Py_IS_TYPE_SIGNED() macro (#93178)
_posixsubprocess: add a static assertion to ensure that the pid_t type is signed. Replace _Py_IntegralTypeSigned() with _Py_IS_TYPE_SIGNED().
This commit is contained in:
parent
cb04a09d2d
commit
22b75d9bef
4 changed files with 25 additions and 7 deletions
|
|
@ -612,8 +612,10 @@ child_exec(char *const exec_array[],
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_SETPGID
|
||||
if (pgid_to_set >= 0)
|
||||
static_assert(_Py_IS_TYPE_SIGNED(pid_t), "pid_t is unsigned");
|
||||
if (pgid_to_set >= 0) {
|
||||
POSIX_CALL(setpgid(0, pgid_to_set));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETGROUPS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue