Rev | Line | |
---|
[9] | 1 | .TH INTR 8
|
---|
| 2 | .SH NAME
|
---|
| 3 | intr \- run a command with interrupts enabled
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | .B intr
|
---|
| 6 | .RB [ \-d ]
|
---|
| 7 | .RB [ \-t
|
---|
| 8 | .IR seconds ]
|
---|
| 9 | .I command
|
---|
| 10 | .RI [arg "...]"
|
---|
| 11 | .SH DESCRIPTION
|
---|
| 12 | .B Intr
|
---|
| 13 | executes a command with keyboard interrupts enabled, and standard input,
|
---|
| 14 | output and error redirected to the terminal or the console. It may also
|
---|
| 15 | be used for the opposite: to detach a process from the terminal.
|
---|
| 16 | .PP
|
---|
| 17 | There are three situations where intr may be used: From a process that has
|
---|
| 18 | no controlling tty, like the shell running
|
---|
| 19 | .B /etc/rc
|
---|
| 20 | at boot time, from a script that runs in the background, or by the System
|
---|
| 21 | Administrator to restart a daemon.
|
---|
| 22 | .PP
|
---|
| 23 | In the first case
|
---|
| 24 | .B intr
|
---|
| 25 | will use
|
---|
| 26 | .B /dev/console
|
---|
| 27 | as a controlling tty and as standard input, output and error. In the
|
---|
| 28 | second case
|
---|
| 29 | .B intr
|
---|
| 30 | will use
|
---|
| 31 | .B /dev/tty
|
---|
| 32 | to connect the command to the controlling tty. In the third case the
|
---|
| 33 | process will be removed from the process group, and will have I/O redirected
|
---|
| 34 | to
|
---|
| 35 | .B /dev/null
|
---|
| 36 | as input, and
|
---|
| 37 | .B /dev/log
|
---|
| 38 | for output.
|
---|
| 39 | .SH OPTIONS
|
---|
| 40 | .TP
|
---|
| 41 | .B \-d
|
---|
| 42 | Daemonize a process instead of bringing it to the foreground. Don't forget
|
---|
| 43 | to use '&' to make the shell not wait for the process, because you won't be
|
---|
| 44 | able to kill it with the interrupt key.
|
---|
| 45 | .TP
|
---|
| 46 | .BI \-t " seconds"
|
---|
| 47 | Schedule an alarm to kill the process in the given number of seconds.
|
---|
| 48 | Use it for a process that may wait indefinitely for a service that may
|
---|
| 49 | not be available.
|
---|
| 50 | .SH FILES
|
---|
| 51 | .TP 20
|
---|
| 52 | .B /dev/console
|
---|
| 53 | Main computer console.
|
---|
| 54 | .TP
|
---|
| 55 | .B /dev/log
|
---|
| 56 | Message logging device.
|
---|
| 57 | .TP
|
---|
| 58 | .B /dev/tty
|
---|
| 59 | Name for the controlling tty.
|
---|
| 60 | .SH "SEE ALSO"
|
---|
| 61 | .BR boot (8),
|
---|
| 62 | .BR tty (4),
|
---|
| 63 | .BR setsid (2),
|
---|
| 64 | .BR alarm (2).
|
---|
| 65 | .SH BUGS
|
---|
| 66 | Maybe
|
---|
| 67 | .B intr \-d
|
---|
| 68 | should fork to daemonize a process, but the author likes it if the process
|
---|
| 69 | stays in the jobs list of his shell.
|
---|
| 70 | .SH AUTHOR
|
---|
| 71 | Kees J. Bot (kjb@cs.vu.nl)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.