mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
check: only call setpgid on valid child PIDs
Coverity 206186
This commit is contained in:
parent
9c821554fc
commit
b9313afc75
1 changed files with 2 additions and 1 deletions
|
@ -571,6 +571,7 @@ check_fork (void)
|
||||||
#ifdef _POSIX_VERSION
|
#ifdef _POSIX_VERSION
|
||||||
pid_t pid = fork ();
|
pid_t pid = fork ();
|
||||||
/* Set the process to a process group to be able to kill it easily. */
|
/* Set the process to a process group to be able to kill it easily. */
|
||||||
|
if (pid > 0)
|
||||||
setpgid (pid, group_pid);
|
setpgid (pid, group_pid);
|
||||||
return pid;
|
return pid;
|
||||||
#else /* _POSIX_VERSION */
|
#else /* _POSIX_VERSION */
|
||||||
|
|
Loading…
Reference in a new issue