From e98c6f14159186418ba2320450a25a2d4fbde33b Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 22 Apr 2024 11:00:22 +0200 Subject: [PATCH] [Process] Mention `Process::setIgnoredSignals` --- components/process.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/process.rst b/components/process.rst index c4db5c18a9c..9502665dde1 100644 --- a/components/process.rst +++ b/components/process.rst @@ -511,6 +511,20 @@ When running a program asynchronously, you can send it POSIX signals with the // will send a SIGKILL to the process $process->signal(SIGKILL); +You can make the process ignore signals by using the +:method:`Symfony\\Component\\Process\\Process::setIgnoredSignals` +method. The given signals won't be propagated to the child process:: + + use Symfony\Component\Process\Process; + + $process = new Process(['find', '/', '-name', 'rabbit']); + $process->setIgnoredSignals([SIGKILL, SIGUSR1]); + +.. versionadded:: 7.1 + + The :method:`Symfony\\Component\\Process\\Process::setIgnoredSignals` + method was introduced in Symfony 7.1. + Process Pid ----------- pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy