signal {fork} | R Documentation |
This function allows enabling or disabling handling of the specified signal.
signal(signal, action = c("ignore", "default"))
signal |
Signal handler to manipulate, either as a numeric id or character mnemonic |
action |
Either "ignore" or "default" |
It is occasionally necessary to instruct the R process to ignore certain signals. This function allows changing the status of a signal to either igore the signal (SIG_IGN="ignore") or to the OS's default handler (SIG_DFL="default")
Nothing of interest.
Be very careful with this function. It can be used to totally confuse the R process.
Gregory R. Warnes gregory.warnes@rochester.edu
See the unix man page for "signal" for more information
## Not run: # Ignore child termination signals for forked processes signal("SIGCHLD","ignore") # Fork off a child process to say "Hi!". { pid = fork(slave=NULL) if(pid==0) { # only runs in the child process cat("Hi from the child process!\n"); exit() # force process to die } } ## End(Not run)