X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/misc/blobdiff_plain/f42ff973cd0e180e7decb57cd9818a3f18e635f7..0db9a123423710b79d3191146e5055806ccf9e36:/mtimeout.1 diff --git a/mtimeout.1 b/mtimeout.1 index 9332807..147b097 100644 --- a/mtimeout.1 +++ b/mtimeout.1 @@ -4,8 +4,15 @@ mtimeout \- run a program for at most a given amount of time . .SH SYNOPSIS .B mtimeout +.RB [ \-K ] +.RB [ \-k +.IR time ] +.RB [ \-b +.IR time ] .RB [ \-s .IR signal ] +.br + \c .I time .I command .RI [ arguments ...] @@ -41,11 +48,15 @@ sends its child process group the specified signal, by default .BR SIGTERM , though you can choose a different one with the .B \-s -option. It then waits an additional five seconds. If the child still -hasn't exited, it sends +option. It then waits an additional five seconds (configurable with +the +.B \-k +option). If the child still hasn't exited, it sends .B SIGKILL -to the process group and waits a further five seconds. If the child -still hasn't exited in this time, then +to the process group and waits a further five seconds (configurable +with the +.B \-b +option). If the child still hasn't exited in this time, then .B mtimeout gives up and exits. .PP @@ -62,6 +73,39 @@ successfully. .B \-u, \-\-usage Prints a brief usage summary to standard output, and exits successfully. .TP +.BI "\-b, \-\-bored-after=" time +After sending +.B SIGKILL +(or, with +.BR \-K , +the original signal) +wait for +.I time +before giving up and declaring the child process undead. The default +wait is five seconds. The +.I time +may have a unit suffix. +.TP +.B "\-K, \-\-no-kill" +Don't send a +.B SIGKILL +to the process: just wait for a while (see the +.B \-b +option) after sending the original signal to see whether it actually +dies. +.TP +.B "\-k, \-\-kill-after=" time +After sending a signal, wait for +.I time +before sending +.BR SIGKILL . +The default wait is five seconds. The +.I time +may have a unit suffix. +This option has no effect if +.BR \-K +is set. +.TP .BI "\-s, \-\-signal=" signal Send .I signal