<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/pwait/pwait.c, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F14</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F14'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-10-30T10:38:18Z</updated>
<entry>
<title>pwait: Add an option to print remaining processes</title>
<updated>2025-10-30T10:38:18Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-10-28T11:56:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cacba7a15e35857da7adece3bc3cf1a3a2679b9c'/>
<id>urn:sha1:cacba7a15e35857da7adece3bc3cf1a3a2679b9c</id>
<content type='text'>
* On startup, insert all valid PIDs into a tree.
* In our main loop, whenever a process terminates, remove its PID
  from the tree.
* On exit, if the -p flag was specified, print the remaining PIDs.

MFC after:	3 days
Reviewed by:	bcr, markj
Differential Revision:	https://reviews.freebsd.org/D53293

(cherry picked from commit 3d73146baeb933fe955c7496572b483a9f92914c)
</content>
</entry>
<entry>
<title>pwait: Avoid calling getpid(2) for each proc.</title>
<updated>2025-10-30T10:38:18Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2025-10-10T18:00:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4e06e622b1070b618ecb37afa5ba5876f913a682'/>
<id>urn:sha1:4e06e622b1070b618ecb37afa5ba5876f913a682</id>
<content type='text'>
(cherry picked from commit ab4abce6c2c2091a3b9ea1f38cbef94ee7a68090)
</content>
</entry>
<entry>
<title>pwait: Fix timeout unit parser</title>
<updated>2025-10-02T07:28:58Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-09-23T12:56:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=278c371fd2db6a534d5a553d5eb18e53e14b2a8d'/>
<id>urn:sha1:278c371fd2db6a534d5a553d5eb18e53e14b2a8d</id>
<content type='text'>
The timeout parser would check the first character after the number and
ignore any subsequent ones.

While here, switch to bool for booleans and fix some style nits.

MFC after:	1 week
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D52612

(cherry picked from commit 3aac05f56620712744cb57d71a0ef42f8d8e3b52)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>urn:sha1:1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>Fix typo in pwait.c introduced in 5bdce6ff546e</title>
<updated>2021-01-21T21:43:27Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2021-01-21T21:43:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bbff3a72b23a389aebd492ad7c9db9a51166e907'/>
<id>urn:sha1:bbff3a72b23a389aebd492ad7c9db9a51166e907</id>
<content type='text'>
Reported by:	kevans
</content>
</entry>
<entry>
<title>Remove deadlock in rc caused by pwait waiting for itself.</title>
<updated>2021-01-21T21:36:37Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2021-01-21T21:26:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5bdce6ff546e00673f9f515d2165d02901e858aa'/>
<id>urn:sha1:5bdce6ff546e00673f9f515d2165d02901e858aa</id>
<content type='text'>
The following situation can trigger the deadlock:
1) Long time ago a_service was started through rc.d
2) We want to restart a_service and issue service a_service restart
3) rc.subr reads current process PID (via file or process),
   sends TERM signal and runs pwait with PID harvested
4) a_service process dies very quickly so it's PID becomes available.
   It is possible that while original process was running,
   PID counter overflowed and pwait got assigned a_service's PID.

This patch ignores pid(s) to wait that are equal to pwait PID.

Reported by:	Dan McGregor, Boris Lytochkin
Submitted by:	Boris Lytochkin &lt;lytboris at gmail.com&gt;
Reviewed By:	0mp
MFC after:	2 weeks
PR:		218598
Differential Revision: https://reviews.freebsd.org/D28240
</content>
</entry>
<entry>
<title>Remove unused include.</title>
<updated>2020-02-02T20:51:28Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2020-02-02T20:51:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=778ac8d3711fd1f968479b6be867ad938cedd24a'/>
<id>urn:sha1:778ac8d3711fd1f968479b6be867ad938cedd24a</id>
<content type='text'>
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Restore previous usage presentation (without "pwait: " prefix).</title>
<updated>2020-02-01T09:13:11Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2020-02-01T09:13:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d731a314d3aa9cb283c03be82ba6526c1c2f1d8e'/>
<id>urn:sha1:d731a314d3aa9cb283c03be82ba6526c1c2f1d8e</id>
<content type='text'>
Pointed out by:	jilles
</content>
</entry>
<entry>
<title>Style changes, mostly usage of braces around single line statements -</title>
<updated>2020-01-26T11:13:34Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2020-01-26T11:13:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=967735479078884908dbb9eed0ab40f84371570a'/>
<id>urn:sha1:967735479078884908dbb9eed0ab40f84371570a</id>
<content type='text'>
it is safer and allowed for some time now by style(9).

Sponsored by:	Fudo Security
</content>
</entry>
<entry>
<title>Implement -o flag which tells pwait(1) to exit if any of the given processes</title>
<updated>2020-01-26T11:02:51Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2020-01-26T11:02:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2362bc2cf533639c55165e3d5b870109ec69976f'/>
<id>urn:sha1:2362bc2cf533639c55165e3d5b870109ec69976f</id>
<content type='text'>
has terminated.

Sponsored by:	Fudo Security
</content>
</entry>
</feed>
