summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c5ed60b)
The Coreutils version is broken: it places itself in a new process group
and its child inherits the new process group (though this isn't
documented anywhere). This stops interactive signals from working
properly.
dist_man_MANS += pause.1
endif
dist_man_MANS += pause.1
endif
-bin_PROGRAMS += timeout
-timeout_SOURCES = timeout.c
-timeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
-dist_man_MANS += timeout.1
+bin_PROGRAMS += mtimeout
+mtimeout_SOURCES = mtimeout.c
+mtimeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
+dist_man_MANS += mtimeout.1
splitconf,
xtitle,
pause,
splitconf,
xtitle,
pause,
Depends: ${shlibs:Depends}, python (>= 2.4), python-cdb
Description: Simple utilities for messing with CDB files.
Depends: ${shlibs:Depends}, python (>= 2.4), python-cdb
Description: Simple utilities for messing with CDB files.
Architecture: any
Section: utils
Depends: ${shlibs:Depends}
Architecture: any
Section: utils
Depends: ${shlibs:Depends}
if-mtu.1 if-mtu /usr/share/man/man1
inplace inplace /usr/bin
inplace.1 inplace /usr/share/man/man1
if-mtu.1 if-mtu /usr/share/man/man1
inplace inplace /usr/bin
inplace.1 inplace /usr/share/man/man1
-timeout timeout /usr/bin
-timeout.1 timeout /usr/share/man/man1
+mtimeout mtimeout /usr/bin
+mtimeout.1 mtimeout /usr/share/man/man1
locking locking /usr/bin
locking.1 locking /usr/share/man/man1
not nsict-mail /usr/bin
locking locking /usr/bin
locking.1 locking /usr/share/man/man1
not nsict-mail /usr/bin
-.TH "timeout" 1 "5 June 2011" "Mark Wooding" "Toys"
+.TH "mtimeout" 1 "5 June 2011" "Mark Wooding" "Toys"
-timeout \- run a program for at most a given amount of time
+mtimeout \- run a program for at most a given amount of time
.RB [ \-s
.IR signal ]
.I seconds
.RB [ \-s
.IR signal ]
.I seconds
command runs a specified program for at most a given number of
.IR seconds .
.PP
It works by running the given command as a separate process group. It
then waits either for the top-level process (only) to exit, or for the
timeout to expire, whichever happens first. If the process exits, then
command runs a specified program for at most a given number of
.IR seconds .
.PP
It works by running the given command as a separate process group. It
then waits either for the top-level process (only) to exit, or for the
timeout to expire, whichever happens first. If the process exits, then
exits too, setting its exit status to match. Any other processes which
may have been started are left unmolested.
.PP
On the other hand, if the timeout goes off, then
exits too, setting its exit status to match. Any other processes which
may have been started are left unmolested.
.PP
On the other hand, if the timeout goes off, then
sends its child process group the specified signal, by default
.BR SIGTERM ,
though you can choose a different one with the
sends its child process group the specified signal, by default
.BR SIGTERM ,
though you can choose a different one with the
.B SIGKILL
to the process group and waits a further five seconds. If the child
still hasn't exited in this time, then
.B SIGKILL
to the process group and waits a further five seconds. If the child
still hasn't exited in this time, then
gives up and exits.
.PP
The following command-line options are recognized.
gives up and exits.
.PP
The following command-line options are recognized.
program sets its exit status as follows.
.TP
0\(em127
The child process ran to completion within the given time:
program sets its exit status as follows.
.TP
0\(em127
The child process ran to completion within the given time:
exit status is the same as that of the child process.
.TP
128
The child process exited in a way which
exit status is the same as that of the child process.
.TP
128
The child process exited in a way which
could not interpret.
.TP
129\(em250
The child process was killed by a signal: the exit status is 128 higher
than the signal number. If
could not interpret.
.TP
129\(em250
The child process was killed by a signal: the exit status is 128 higher
than the signal number. If
had to kill the child because it took too long, then its exit status
will be like this.
.TP
251
The child took too long and couldn't be killed:
had to kill the child because it took too long, then its exit status
will be like this.
.TP
251
The child took too long and couldn't be killed:
program couldn't parse the arguments provided to it: an error message
was written to standard error.
.TP
254
A system call made by
program couldn't parse the arguments provided to it: an error message
was written to standard error.
.TP
254
A system call made by
failed unexpectedly: an error message was written to standard error.
.TP
255
failed unexpectedly: an error message was written to standard error.
.TP
255
works by running its child process in a separate process group, it
interacts oddly with interactive shells. If the child process group
attempts to do terminal I/O (particularly reading from a terminal) then
works by running its child process in a separate process group, it
interacts oddly with interactive shells. If the child process group
attempts to do terminal I/O (particularly reading from a terminal) then
program makes an effort to propagate interesting signals to its child
process group. Currently, it propagates
.BR SIGTSTP ,
program makes an effort to propagate interesting signals to its child
process group. Currently, it propagates
.BR SIGTSTP ,
option to control this list.
.PP
If you suspend
option to control this list.
.PP
If you suspend
and its child process group, the timer continues running anyway. (I'm
not quite sure whether this is the right behaviour.)
.PP
and its child process group, the timer continues running anyway. (I'm
not quite sure whether this is the right behaviour.)
.PP
earlier than the inner one. Since
.B SIGTERM
isn't propagated (currently, at least), the inner
earlier than the inner one. Since
.B SIGTERM
isn't propagated (currently, at least), the inner
is killed by the outer one, and loses control of its child process
group. You could possibly work around this by sending
.B SIGQUIT
is killed by the outer one, and loses control of its child process
group. You could possibly work around this by sending
.B SIGQUIT