MCPcopy Create free account
hub / github.com/coreutils/coreutils / send_sig

Function send_sig

src/timeout.c:181–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179/* send SIG avoiding the current process. */
180
181static int
182send_sig (pid_t where, int sig)
183{
184 /* If sending to the group, then ignore the signal,
185 so we don't go into a signal loop. Note that this will ignore any of the
186 signals registered in install_cleanup(), that are sent after we
187 propagate the first one, which hopefully won't be an issue. Note this
188 process can be implicitly multithreaded due to some timer_settime()
189 implementations, therefore a signal sent to the group, can be sent
190 multiple times to this process. */
191 if (where == 0)
192 signal (sig, SIG_IGN);
193 return kill (where, sig);
194}
195
196/* Signal handler which is required for sigsuspend() to be interrupted
197 whenever SIGCHLD is received. */

Callers 1

cleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected