From: Mike Yuan Date: Thu, 20 Feb 2025 19:51:05 +0000 (+0100) Subject: process-util: refuse FORK_WAIT + FORK_FREEZE combination X-Git-Tag: v258-rc1~1277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ddbc34e1521ae40638199ba983651dbe1149a20;p=thirdparty%2Fsystemd.git process-util: refuse FORK_WAIT + FORK_FREEZE combination --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 7d86c868c3b..2779f3a234c 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1542,6 +1542,7 @@ int pidref_safe_fork_full( _cleanup_close_pair_ int pidref_transport_fds[2] = EBADF_PAIR; int prio, r; + assert(!FLAGS_SET(flags, FORK_WAIT|FORK_FREEZE)); assert(!FLAGS_SET(flags, FORK_DETACH) || (flags & (FORK_WAIT|FORK_DEATHSIG_SIGTERM|FORK_DEATHSIG_SIGINT|FORK_DEATHSIG_SIGKILL)) == 0);