[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: process substitution fd lifetime race condition

From: Chet Ramey
Subject: Re: process substitution fd lifetime race condition
Date: Mon, 20 Apr 2020 18:08:30 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/20/20 6:02 PM, Jason A. Donenfeld wrote:

> It seems like process substitution fifo lifetime is really tricky. You
> can't really reference track, since the path is just a string that
> could be manipulated. So how do you know when it's safe to clean up
> that fd and that nobody is using it? 

In general, you clean up a procsub fd, and remove any named pipes from the
file system, when the block that uses it (or created it) ends. That is, as
you noticed, sometimes tricky.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]