#ifdef _POSIX_VERSION
pid_t pid = fork ();
/* Set the process to a process group to be able to kill it easily. */
- setpgid (pid, group_pid);
+ if (pid > 0)
+ setpgid (pid, group_pid);
return pid;
#else /* _POSIX_VERSION */
eprintf ("This version does not support fork", __FILE__, __LINE__);