#include #include #include #include static int p[2]; int execve(const char *path, char *const argv[], char *const envp[]) { close(p[1]); kill(getppid(), SIGKILL); read(p[0], &(char){0}, 1); errno = ENOENT; return -1; } int main(int argc, char *argv[], char *envp[]) { signal(SIGPIPE, SIG_IGN); pipe(p); posix_spawn(0L, "/non-existing", 0L, 0L, argv, envp); return 0; }