On Wed, Aug 23, 2023 at 08:42:03AM -0600, Todd C. Miller wrote:
> On Tue, 22 Aug 2023 19:55:56 -0700, Andrew Hewus Fresh wrote:
> 
> > I noticed this when testing how signal handling worked in fw_update, it
> > turns out that if you `pkill -KILL -f fw_update` it may leave behind a perl
> > process that is locking the package database.  Instead of just waiting
> > to be killed, we can have that process check to see if its parent is
> > still around and exit if not.
> >
> > Is there a more appropriate solution to this?
> > What's the right way to notice your parent exited?
> 
> One way is to have a pipe between the parent and child and use
> select() instead of the sleep() to tell when it goes away.

I would have to see an example of doing that between ksh and perl.

Reply via email to