Date: Tue, 24 May 2022 20:10:07 +0200 From: Stefan Esser <se@FreeBSD.org> To: Mike Karels <mike@karels.net> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 81cea61f3b3a - main - bin/sleep: document more non-standard features Message-ID: <a18e2539-b2d0-4fc6-9d54-b65eb87389db@FreeBSD.org> In-Reply-To: <CFEE5362-D806-479B-9870-3B04313252B8@karels.net> References: <202205240933.24O9XPv8015486@gitrepo.freebsd.org> <CFEE5362-D806-479B-9870-3B04313252B8@karels.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------ZfIEy2jfn0k02XHZM4a0j0U2
Content-Type: multipart/mixed; boundary="------------sqAgmYhA0hKUXLUZopr8Jw30";
protected-headers="v1"
From: Stefan Esser <se@FreeBSD.org>
To: Mike Karels <mike@karels.net>
Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
dev-commits-src-main@FreeBSD.org
Message-ID: <a18e2539-b2d0-4fc6-9d54-b65eb87389db@FreeBSD.org>
Subject: Re: git: 81cea61f3b3a - main - bin/sleep: document more non-standard
features
References: <202205240933.24O9XPv8015486@gitrepo.freebsd.org>
<CFEE5362-D806-479B-9870-3B04313252B8@karels.net>
In-Reply-To: <CFEE5362-D806-479B-9870-3B04313252B8@karels.net>
--------------sqAgmYhA0hKUXLUZopr8Jw30
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Am 24.05.22 um 14:24 schrieb Mike Karels:
> On 24 May 2022, at 4:33, Stefan E=C3=9Fer wrote:
>=20
>> diff --git a/bin/sleep/sleep.1 b/bin/sleep/sleep.1
>> index 85086acec5ad..f7da87152f99 100644
>> --- a/bin/sleep/sleep.1
>> +++ b/bin/sleep/sleep.1
>> @@ -70,9 +70,10 @@ signal is not handled specially by this implementat=
ion.
>> .Pp
>> The
>> .Nm
>> -command allows and honors a non-integer number of seconds to sleep
>> -in any form acceptable by
>> -.Xr strtod 3 and it accepts more than one delay value.
>> +command supports other time units than seconds,
>> +honors a non-integer number of time units to sleep in any form accept=
able by
>> +.Xr strtod 3 ,
>> +and accepts more than one delay value.
>> These are non-portable extensions, but they have also been implemente=
d
>> in GNU sh-utils since version 2.0a (released in 2002).
>> .Sh EXIT STATUS
>=20
> Is there a reason you didn=E2=80=99t list the time units that are suppo=
rted?
> It would also be good to say how they are specified.
Commit 34978f7edd has already added the following text to the
man page:
--- a/bin/sleep/sleep.1
+++ b/bin/sleep/sleep.1
@@ -40,13 +40,21 @@
.Nd suspend execution for an interval of time
.Sh SYNOPSIS
.Nm
-.Ar seconds
+.Ar number[unit]
.Sh DESCRIPTION
The
.Nm
command
suspends execution for a minimum of
-.Ar seconds .
+.Ar number
+seconds (the default, or unit
+.Ar s ) ,
+or minutes (unit
+.Ar m ) ,
+hours (unit
+.Ar h ) ,
+or days (unit
+.Ar d ) .
.Pp
If the
.Nm
The rendered man page section reads:
SYNOPSIS
sleep number[unit] ...
DESCRIPTION
The sleep command suspends execution for a minimum of number seconds=
(the
default, or unit s), minutes (unit m), hours (unit h), or days (unit=
d).
If multiple arguments are passed, the delay will be the sum of all
values.
The first line of the description has been proposed in PR 264162 with the=
patch that added support of units other than seconds.
Support of multiple arguments has been added by me after noticing that th=
is
would make the FreeBSD sleep(1) support the same functionality as offered=
by
the coreutils version.
The commit you replied to has just added the two new features to the
IMPLEMENTATIION NOTES section in order to complete the list of non-standa=
rd
features offered after the two functional extensions.
Regards, STefan
--------------sqAgmYhA0hKUXLUZopr8Jw30--
--------------ZfIEy2jfn0k02XHZM4a0j0U2
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"
-----BEGIN PGP SIGNATURE-----
wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmKNH38FAwAAAAAACgkQR+u171r99USI
wQf7BW47STwCVu1ljHj6bShmG0P4AWblK2GtC6gEeYqkB9NDIux7xDrhMw/k2MqAPuMh+NIzpWWl
TbsEfUUu/ip/vwcv2rwC+r3a1Lc03dii/SG9FtUe38yPSC5M+vLmP2QJ141wY7la6dJAibs0Tae0
OfTdlbajh1NlDd/AM4jXsa/iYsXBWKokuS5XKdggV3j01aGWrH/45sd0LXwVa0WyGIqAJp/AuZmc
KjurmQepjSg97Hz80zslF/Rh5itonexaiN4dPpuJH1St+YvgYzkc816GwqQwYvDVd8qtH9za35ej
Hxq69v8dLYIKOVr4QG6jkhkjYd6pych88j7mqHTVag==
=kPiG
-----END PGP SIGNATURE-----
--------------ZfIEy2jfn0k02XHZM4a0j0U2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a18e2539-b2d0-4fc6-9d54-b65eb87389db>
