Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 4 Mar 2018 22:30:30 -0800 |
| 4 | Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h |
| 5 | |
| 6 | Fixes |
| 7 | main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'? |
| 8 | signal(SIGCLD, sig_child); |
| 9 | ^~~~~~ |
| 10 | SIGCHLD |
| 11 | |
| 12 | main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration] |
| 13 | umask(0); |
| 14 | ^~~~~ |
| 15 | |
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 17 | --- |
| 18 | Upstream-Status: Pending |
| 19 | |
| 20 | src/main.c | 5 +++-- |
| 21 | 1 file changed, 3 insertions(+), 2 deletions(-) |
| 22 | |
| 23 | diff --git a/src/main.c b/src/main.c |
| 24 | index 3cf4072..cd34196 100644 |
| 25 | --- a/src/main.c |
| 26 | +++ b/src/main.c |
| 27 | @@ -31,6 +31,7 @@ |
| 28 | #include <sys/ioctl.h> |
| 29 | #include <sys/wait.h> |
| 30 | #include <sys/param.h> |
| 31 | +#include <sys/types.h> |
| 32 | #include <pthread.h> |
| 33 | #include <fcntl.h> |
| 34 | #include <unistd.h> |
| 35 | @@ -126,9 +127,9 @@ static void daemon_start(int ignsigcld) |
| 36 | |
| 37 | if (ignsigcld) { |
| 38 | #ifdef SIGTSTP |
| 39 | - signal(SIGCLD, sig_child); |
| 40 | + signal(SIGCHLD, sig_child); |
| 41 | #else |
| 42 | - signal(SIGCLD, SIG_IGN); |
| 43 | + signal(SIGCHLD, SIG_IGN); |
| 44 | #endif |
| 45 | } |
| 46 | } |
| 47 | -- |
| 48 | 2.16.2 |
| 49 | |