Execute a command on another node or tty (QNX)
on [-d] [-f nid] [-h] [-n node] [-p prio] [-r root] [-s] [-t tty] command
The on utility extends the process creation abilities of the Shell (sh). You can start a process on a remote node, on a different controlling terminal, in a HELD state for debugging or later synchronized starting, or with a default network root that differs from the one used by its parent.
If the -d option is not specified, a virtual circuit is created as a local agent for the remote child process. When the child terminates, the parent must do a wait() on the virtual circuit to reap the zombie process entry for the child. If the -d option is specified, the command is detached from its parent. The parent won't be able to do a wait() for the child, nor will it be able to control it via signals.
By default, the command is run in the current session. The -t option starts a new session, which means the command won't receive a SIGHUP if the current session leader terminates.
The on -t command will become the new session leader on the tty specified, i.e. it will receive SIGHUP generated by hangups on that tty. Any processes originally running on that tty will NOT get SIGHUP, and this condition will persist even when the process started by on has terminated. For this reason, on -t should specify only ttys that are not currently in use. |
Run login on console 2:
on -t /dev/con2 login
Run who on node 3:
on -n 3 who
Run sort as an orphan on node 3:
on -d -n 3 sort file.dat
Run who on node 7 with a new session, its standard I/O connected to console 1 on node 3:
on -t //3/dev/con1 -n7 who
Run make on node 3, using node 3 as the network root -- this eliminates the need to resolve pathnames through the invoking node:
on -n 3 -r //3/ make
The on utility exits with the exit status of the command.