<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/timeout, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-04-13T19:52:21Z</updated>
<entry>
<title>timeout.1: Document non-POSIX options</title>
<updated>2026-04-13T19:52:21Z</updated>
<author>
<name>Artem Bunichev</name>
<email>tembun@bk.ru</email>
</author>
<published>2026-04-13T01:15:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b1bc748430b5ee79ae103c464dbf5ebc8802f782'/>
<id>urn:sha1:b1bc748430b5ee79ae103c464dbf5ebc8802f782</id>
<content type='text'>
MFC after:		3 days
Reviewed by:		Aaron Li &lt;aly@aaronly.me&gt;, ziaee
Differential Revision:	https://reviews.freebsd.org/D56090
</content>
</entry>
<entry>
<title>timeout: Clean up</title>
<updated>2026-02-13T20:19:16Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-13T20:18:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=08208cd694815cc855835960f55231342eb35934'/>
<id>urn:sha1:08208cd694815cc855835960f55231342eb35934</id>
<content type='text'>
* Annotate logv() and fix format string bug.

* Don't reinvent str2sig(3).

* Reorganize kill_self() so we unblock signals as late as possible, and
  use raise(2) instead of kill(2).

* Explicitly close unused pipe descriptors.

* Use correct type to collect result of read(2) and write(2).

* Compare return values to 0, not -1.

* Sort local variables according to style(9).

* Reduce unnecessary nesting.

* Reindent.

* Fix typo in manual page.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55277
</content>
</entry>
<entry>
<title>timeout(1): add license header to unit test</title>
<updated>2025-09-03T09:52:46Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2025-09-03T09:52:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=245f2abf94889d3fd69360c4f49532074ff25fbf'/>
<id>urn:sha1:245f2abf94889d3fd69360c4f49532074ff25fbf</id>
<content type='text'>
Requested by:	kevans
</content>
</entry>
<entry>
<title>timeout(1) tests: atf_fail requires a reason</title>
<updated>2025-06-09T23:52:41Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-06-09T10:26:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4078e0d1d6f8189bff44fcad04df256220035f76'/>
<id>urn:sha1:4078e0d1d6f8189bff44fcad04df256220035f76</id>
<content type='text'>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50752
</content>
</entry>
<entry>
<title>timeout(1): pass full 32bit error return code from the exited child</title>
<updated>2025-06-09T23:52:34Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-06-09T03:20:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=81ef00125056a68ca3bba1424d6cb13533bf474c'/>
<id>urn:sha1:81ef00125056a68ca3bba1424d6cb13533bf474c</id>
<content type='text'>
Switch to use waitid(2) to receive siginfo_t with the complete error
code from the exited process.

Tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50752
</content>
</entry>
<entry>
<title>timeout(1): only start the child command after the parent is fully set up</title>
<updated>2025-06-09T23:51:19Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-06-08T15:47:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aa8cdb7cae7b7550d5cb81d85ee294c4f182f694'/>
<id>urn:sha1:aa8cdb7cae7b7550d5cb81d85ee294c4f182f694</id>
<content type='text'>
Since the default disposition for SIGCHLD is ignore, the prematurely
exited child would cause SIGCHLD dropped.  This makes timeout(1) hang,
because REAP_STATUS reports a zombie not waited for, but SIGCHLD for it
was already lost, so the main loop cannot exit, instead calling into
sigsuspend().

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50752
</content>
</entry>
<entry>
<title>timeout(1): print errno when signalling syscalls failed</title>
<updated>2025-06-09T23:51:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-06-07T11:29:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bff05e8a8c3c64bfe6152870cb758d00991ec66b'/>
<id>urn:sha1:bff05e8a8c3c64bfe6152870cb758d00991ec66b</id>
<content type='text'>
Tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50752
</content>
</entry>
<entry>
<title>timeout(1): silence warnings for ESRCH</title>
<updated>2025-06-09T23:51:06Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-06-07T11:24:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=15e4b8d5ef845066819c4cbb5d03b63148688298'/>
<id>urn:sha1:15e4b8d5ef845066819c4cbb5d03b63148688298</id>
<content type='text'>
It is possible for the child to become zombie and then there is nothing
to signal.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D50752
</content>
</entry>
<entry>
<title>timeout(1): Document the reaper implementation and behaivor</title>
<updated>2025-04-16T19:45:38Z</updated>
<author>
<name>Aaron LI</name>
<email>aly@aaronly.me</email>
</author>
<published>2025-04-03T02:54:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c362781c8d6a878ac93f3debc45d401bd5296eee'/>
<id>urn:sha1:c362781c8d6a878ac93f3debc45d401bd5296eee</id>
<content type='text'>
If timeout(1) runs with the --foreground option, it becomes the reaper
of the command and its descendants and will wait for all of them to
terminate.  This behavior is different from the old FreeBSD version and
GNU version.

For example, if there is a descendant running in the background, like:
$ timeout -s INT 2 sh -c 'sleep 4 &amp; sleep 5'
when timeout(1) sends the SIGINT to all descendants, the child 'sh'
process and the foreground 'sleep 5' process will immediately terminate,
but the background 'sleep 4' will be reparented to the timeout(1)
itself.  Because a background process ignores SIGINT and SIGQUIT,
the whole command completes until the background 'sleep 4' finishes.

In comparison, the old FreeBSD version and GNU version will just
terminate itself, letting the background 'sleep 4' process be reparented
to an upper reaper like init.

The POSIX.1-2024 standard doesn't specify the required behavior in such
cases, so I decided to keep the current implementation.  Nonetheless,
the updated timeout(1) has changed a lot in order to conform to the
standard.

Obtained-from: DragonFly BSD
</content>
</entry>
<entry>
<title>timeout(1): adapt the preserve_status test to the new behaviour</title>
<updated>2025-04-16T19:45:38Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2025-04-16T19:41:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a25b03791764b7817a1a3e05ac1ab91c75a946ac'/>
<id>urn:sha1:a25b03791764b7817a1a3e05ac1ab91c75a946ac</id>
<content type='text'>
atf-check cannot check anymore the exit number if the program is
terminated via a signal, it needs to be catched by -s signal
because we cannot pass twice the -s command, we cannot anymore check
for the exit value :(
</content>
</entry>
</feed>
