History log of /freebsd-current/bin/pwait/pwait.1
Revision Date Author Comments
# 1a7c9e15 27-Nov-2023 Mike Karels <karels@FreeBSD.org>

pwait.1: add missing prompt and command in examples

Two examples showed '$?' alone on a line, which should be '$ echo $?'.
The third example got it right. Fix the first two.


# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


# 5bdce6ff 21-Jan-2021 Alexander V. Chernikov <melifaro@FreeBSD.org>

Remove deadlock in rc caused by pwait waiting for itself.

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 <lytboris at gmail.com>
Reviewed By: 0mp
MFC after: 2 weeks
PR: 218598
Differential Revision: https://reviews.freebsd.org/D28240


# 270a4869 05-Oct-2020 Fernando ApesteguĂ­a <fernape@FreeBSD.org>

pwait(1): Add EXAMPLES section to man page

* Add small EXAMPLES section to the man page showing the different
flags and exit codes.

* Complete description for -v flag.

Approved by: manpages (bcr@)


# 2362bc2c 26-Jan-2020 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Implement -o flag which tells pwait(1) to exit if any of the given processes
has terminated.

Sponsored by: Fudo Security


# b06b52ba 07-Mar-2017 Bryan Drewery <bdrewery@FreeBSD.org>

pwait: Add a -t flag to specify a timeout before exiting, and tests.

The exit status will be 124, as the timeout(1) utility uses.

Reviewed by: jilles
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9697


# 50d675f7 28-Mar-2012 Eitan Adler <eadler@FreeBSD.org>

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


# 904d0726 25-Mar-2012 Joel Dahl <joel@FreeBSD.org>

Remove superfluous paragraph macro.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# aa12cea2 14-Apr-2010 Ulrich Spörlein <uqs@FreeBSD.org>

mdoc: order prologue macros consistently by Dd/Dt/Os

Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by: ru
Approved by: philip, ed (mentors)


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 7a8c2427 23-Dec-2009 Jilles Tjoelker <jilles@FreeBSD.org>

MFC r199458: Add pwait utility, which waits for any process to terminate.

This is similar to the Solaris utility of the same name.

Some use cases:
* rc.subr's wait_for_pids
* interactive use, e.g. to shut down the computer when some task is done
even if the task is already running


# 0e5e4167 17-Nov-2009 Jilles Tjoelker <jilles@FreeBSD.org>

Add pwait utility, which waits for any process to terminate.

This is similar to the Solaris utility of the same name.

Some use cases:
* rc.subr's wait_for_pids
* interactive use, e.g. to shut down the computer when some task is done
even if the task is already running

Discussed on: hackers@