Next | Unix Command Internals | 28 |
Every process has a signal handler table
Copied on fork
Some parts of it are preserved across exec
What does nohup do?
It just sets the HUP entry to say 'ignore this signal'
Then it looks at its arguments and execs the command they specify
If a HUP signal is sent to the process, it will be ignored
#!/bin/perl @ARGV or die "Usage: nohup command [args...]\n"; $SIG{HUP} = 'IGNORE'; exec @ARGV or die "Couldn't exec $ARGV[0]: $!\n";
Next | Copyright © 2003 M. J. Dominus |