From 77a16aa3d506fe8f7aa906b3c39d861c8773df8d Mon Sep 17 00:00:00 2001 From: jmc Date: Thu, 12 Jan 2023 14:08:39 +0000 Subject: [PATCH] diff from sobrado to use a full argument name for -s: after some discussion we used "signal", as per pkill/pgrep; also lift the descriptive text from kill.1 to clarify that both signal name and number are accepted; ok sobrado job --- usr.bin/timeout/timeout.1 | 11 ++++++----- usr.bin/timeout/timeout.c | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/usr.bin/timeout/timeout.1 b/usr.bin/timeout/timeout.1 index a44d64aa141..d99ceac62e9 100644 --- a/usr.bin/timeout/timeout.1 +++ b/usr.bin/timeout/timeout.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: timeout.1,v 1.6 2023/01/10 21:10:37 jmc Exp $ +.\" $OpenBSD: timeout.1,v 1.7 2023/01/12 14:08:39 jmc Exp $ .\" $NetBSD: timeout.1,v 1.4 2016/10/13 06:22:26 dholland Exp $ .\" .\" Copyright (c) 2014 Baptiste Daroussin @@ -27,7 +27,7 @@ .\" .\" $FreeBSD: head/usr.bin/timeout/timeout.1 268861 2014-07-18 22:56:59Z bapt $ .\" -.Dd $Mdocdate: January 10 2023 $ +.Dd $Mdocdate: January 12 2023 $ .Dt TIMEOUT 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nm .Op Fl fp .Op Fl k Ar time -.Op Fl s Ar sig +.Op Fl s Ar signal .Ar duration .Ar command .Op Ar arg ... @@ -67,8 +67,9 @@ after the first signal was sent. Always exit with the same status as .Ar command , even if the timeout was reached. -.It Fl s Ar sig , Fl -signal Ns = Ns Ar sig -Specify the signal to send on timeout, instead of the default +.It Fl s Ar signal , Fl -signal Ns = Ns Ar signal +A non-negative decimal number or symbolic signal name specifying +the signal to send on timeout, instead of the default .Dv SIGTERM . .El .Sh DURATION FORMAT diff --git a/usr.bin/timeout/timeout.c b/usr.bin/timeout/timeout.c index d1568b71ae9..e38e66e4850 100644 --- a/usr.bin/timeout/timeout.c +++ b/usr.bin/timeout/timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timeout.c,v 1.23 2023/01/10 14:19:12 job Exp $ */ +/* $OpenBSD: timeout.c,v 1.24 2023/01/12 14:08:39 jmc Exp $ */ /* * Copyright (c) 2021 Job Snijders @@ -55,7 +55,7 @@ static void __dead usage(void) { fprintf(stderr, - "usage: timeout [-fp] [-k time] [-s sig] duration command" + "usage: timeout [-fp] [-k time] [-s signal] duration command" " [arg ...]\n"); exit(1); } -- 2.20.1