diff options
| author | James <31272717+gpd-pocket-hacker@users.noreply.github.com> | 2020-11-09 16:34:32 +0000 |
|---|---|---|
| committer | James <31272717+gpd-pocket-hacker@users.noreply.github.com> | 2020-11-09 16:40:39 +0000 |
| commit | c44cf3a3f0a73ad276c0316759fcb0d8a0d22032 (patch) | |
| tree | 95cd6e8e079c49a8922c0c839b9e2d9e0434137b /email.c | |
| parent | bfac22dc79164bab10185188e12cee313ab96de9 (diff) | |
| download | galaxy_tools-c44cf3a3f0a73ad276c0316759fcb0d8a0d22032.tar.gz galaxy_tools-c44cf3a3f0a73ad276c0316759fcb0d8a0d22032.tar.bz2 galaxy_tools-c44cf3a3f0a73ad276c0316759fcb0d8a0d22032.zip | |
put ascii in subject of emails
Diffstat (limited to 'email.c')
| -rw-r--r-- | email.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -5,6 +5,8 @@ #include <syslog.h> #include <fcntl.h> #include <unistd.h> +#include <sys/wait.h> + #include "email.h" @@ -12,6 +14,9 @@ static int daemonish (int nochdir, int noclose) { + pid_t pid; + int status; + if (!nochdir && chdir ("/")) return -1; @@ -28,7 +33,7 @@ static int daemonish (int nochdir, int noclose) if (failed) return -1; } - switch (fork()) { + switch ((pid = fork())) { case 0: break; @@ -36,6 +41,7 @@ static int daemonish (int nochdir, int noclose) return -1; default: + waitpid (pid, &status, 0); return 1;; } |
