Skip to content

Commit e98c6f1

Browse files
[Process] Mention Process::setIgnoredSignals
1 parent f7225d9 commit e98c6f1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

components/process.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,20 @@ When running a program asynchronously, you can send it POSIX signals with the
511511
// will send a SIGKILL to the process
512512
$process->signal(SIGKILL);
513513

514+
You can make the process ignore signals by using the
515+
:method:`Symfony\\Component\\Process\\Process::setIgnoredSignals`
516+
method. The given signals won't be propagated to the child process::
517+
518+
use Symfony\Component\Process\Process;
519+
520+
$process = new Process(['find', '/', '-name', 'rabbit']);
521+
$process->setIgnoredSignals([SIGKILL, SIGUSR1]);
522+
523+
.. versionadded:: 7.1
524+
525+
The :method:`Symfony\\Component\\Process\\Process::setIgnoredSignals`
526+
method was introduced in Symfony 7.1.
527+
514528
Process Pid
515529
-----------
516530

0 commit comments

Comments
 (0)