Is it possible to set the process group of a child process with PCNTL?

StackOverflow https://stackoverflow.com/questions/18444233

  •  26-06-2022
  •  | 
  •  

Вопрос

The man page for pcntl_waitpid() documents the following option:

wait for any child process whose process group ID is equal to the absolute value of pid.

I'm interested by this feature (waiting for some child processes, but not all), but can't find any reference to how to set the process group ID of a child process.

Is this possible at all with PCNTL?

Это было полезно?

Решение

Found it. PCNTL does not offer this function, but the POSIX extension does offer posix_setpgid():

bool posix_setpgid ( int $pid , int $pgid )
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top