Sets an alarm for the underlying process.
This ensures that, without malicious interception, the process should automatically die after the specified number of seconds.
This is automatically transferred to all child processes and across session and process group boundaries, so there is no need to do anything about child processes.
$ ./alarm 5 /bin/sh -c "echo hello; sleep 6; echo nope"
hello
<exited>