Your message dated Mon, 8 Dec 2025 19:11:04 +1100
with message-id
<CALy8Cw6LWYp8VNDX+F=5Mi=amrqdgnmem83mfklspkjk-pu...@mail.gmail.com>
and subject line pidwait shipped with procps 4.0.0
has caused the Debian Bug report #458330,
regarding [general] "busy wait" tool akin to pgrep, pkill
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
458330: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458330
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: procps
Version: 1:3.2.7-5
Severity: wishlist
Every now and then, you want to wait for some process to finish before
starting another. As long as you are in the same shell that is usually
not a problem. But when the process belongs to another session or user,
it won't work.
That's when I'd like to see a tool like
pbusywait expensive-process && start-my-expensive-process
it could also be used like
pbusywait daemon-i-started-earlier && notify-me-it-has-crashed
to allow for some cheap 'command line monitoring' convenience.
I'm aware that (at least without help from the process owner or pid 1)
this isn't possible without busy waiting, i.e. polling if the process
still exists. I'm also aware that there are potential race conditions
here when a new process would get the same PID assigned while the
polling process is still waiting. Still it would be really useful to me.
Here's what I'm using right now:
---
#!/bin/sh
pid=`pgrep -of $@`
if [ -z "$pid" ]; then
echo "No pid found." >&2
exit 2
fi
echo "Waiting for pid $pid."
while test -d "/proc/$pid"; do
sleep .1
done
# Make sure it's gone...
test -d "/proc/$pid" || exit 1
exit 1
---
Note the use of -o -- I'd otherwise see two shell processes of my
busywaitpid script. Which is one of the huge benefits of using pgrep
instead of "ps | grep". So I'd love to see a pbusywait command which
knows how to handle this. For reasons of shared functionality, code and
shared parameters, it would probably make sense to integrate this with
pgrep/pkill. Probably less than 1k overhead?
--- System information. ---
Architecture: i386
Kernel: Linux 2.6.23-1-686
Debian Release: lenny/sid
500 unstable www.debian-multimedia.org
500 unstable ftp.de.debian.org
1 experimental ftp.de.debian.org
--- Package information. ---
Depends (Version) | Installed
============================-+-=============
libc6 (>= 2.6.1-1) | 2.7-5
libncurses5 (>= 5.6) | 5.6+20071215-1
lsb-base (>= 3.0-10) | 3.1-24
best regards,
Erich Schubert
--
erich@(vitavonni.de|debian.org) -- GPG Key ID: 4B3A135C (o_
A man doesn't know what he knows until he knows what he doesn't know. //\
Zwei Freunde müssen sich im Herzen ähneln, in allem anderen V_/_
können sie grundverschieden sein. --- Sully Prudhomme
--- End Message ---
--- Begin Message ---
Package: procps
Version: 2:4.0.0-1
> Every now and then, you want to wait for some process to finish
before starting another.
>From pgrep manpage:
pidwait will wait for each process instead of listing them on stdout.
Available in procps 4.0.0 or later.
- Craig
--- End Message ---