#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <ctype.h>
#include <signal.h>
#include <printf.h>
+#include "c-ctype.h"
#include "daemon.h"
static char *read_cmdline (void);
if (pid == 0) { /* Child process. */
close (0);
+ open ("/dev/null", O_RDONLY); /* Set stdin to /dev/null (ignore failure) */
close (so_fd[0]);
close (se_fd[0]);
dup2 (so_fd[1], 1);
const struct printf_info *info ATTRIBUTE_UNUSED,
const void *const *args)
{
-#define SAFE(c) (isalnum((c)) || \
+#define SAFE(c) (c_isalnum((c)) || \
(c) == '/' || (c) == '-' || (c) == '_' || (c) == '.')
int i, len;
const char *str = *((const char **) (args[0]));