bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Branden R. Williams" via GNU coreutils Bug Reports <bug-coreutils@gnu.org>
To: 70219@debbugs.gnu.org
Subject: bug#70219: Bug/Issue with timeout and signals
Date: Fri, 5 Apr 2024 10:19:39 -0500	[thread overview]
Message-ID: <ADBC15C8-7D3B-464D-9253-79EEF4091A3F@brandenwilliams.com> (raw)

I was integrating the timeout command into a shell script and realized the manpage & the --help docs do not accurately describe how the tool works. In addition, there appears to be a bug related to arguments passed. I am running version 9.1.

According to the help screen, this command should work:

	timeout -k 10s ping example.com <http://example.com/>

It fails, however, because the next argument after invoking -k is the kill signal you want to send. The command (to send a SIGKILL) must be:

	timeout -k 9 10s ping example.com <http://example.com/>

I believe the kill after functionality and docs should be modified to send a default signal of SIGTERM without an additional argument so the first iteration above would work. Then you could explain that if you wanted to send a DIFFERENT signal, use the -s flag that is there to pass one. But according to the docs, the first command SHOULD work. Even using the --kill-after= syntax passes in the kill signal into that argument, not the actual time.

Thank you for your consideration and for maintaining such a critical set of tools! 

Regards,

B


             reply	other threads:[~2024-04-05 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 15:19 Branden R. Williams via GNU coreutils Bug Reports [this message]
2024-04-05 21:59 ` bug#70219: Bug/Issue with timeout and signals Chris Elvidge
2024-04-05 22:14   ` Branden R. Williams via GNU coreutils Bug Reports
2024-04-06  9:06     ` Andreas Schwab
2024-04-06 12:43       ` Branden R. Williams via GNU coreutils Bug Reports
2024-04-06 14:44         ` Chris Elvidge
2024-04-06 15:50           ` Branden R. Williams via GNU coreutils Bug Reports
2024-04-06 18:30             ` Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ADBC15C8-7D3B-464D-9253-79EEF4091A3F@brandenwilliams.com \
    --to=bug-coreutils@gnu.org \
    --cc=70219@debbugs.gnu.org \
    --cc=brw@brandenwilliams.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).