Lines Matching refs:signal
9 #include <signal.h>
31 void SIGCHLDHandler(int signal) {
38 void GracefulShutdownHandler(int signal) {
43 RAW_CHECK(sigaction(signal, &action, NULL) == 0);
51 reinterpret_cast<const char*>(&signal) + bytes_written,
52 sizeof(signal) - bytes_written));
55 } while (bytes_written < sizeof(signal));
59 void SIGHUPHandler(int signal) {
60 RAW_CHECK(signal == SIGHUP);
61 GracefulShutdownHandler(signal);
65 void SIGINTHandler(int signal) {
66 RAW_CHECK(signal == SIGINT);
67 GracefulShutdownHandler(signal);
71 void SIGTERMHandler(int signal) {
72 RAW_CHECK(signal == SIGTERM);
73 GracefulShutdownHandler(signal);
117 int signal;
123 reinterpret_cast<char*>(&signal) + bytes_read,
124 sizeof(signal) - bytes_read));
135 } while (bytes_read < sizeof(signal));
137 VLOG(1) << "Handling shutdown for signal " << signal << ".";
143 // options. Raise the signal again. The default handler will pick it up
146 kill(getpid(), signal);
148 // The signal may be handled on another thread. Give that a chance to
153 // immediately, with the exit status set to the signal number with bit 8
155 // normally used to indicate an exit by this signal's default handler.
159 _exit(signal | (1 << 7));
194 // If adding to this list of signal handlers, note the new signal probably