[Top][All Lists]

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

Re: Request For Enhancement - TID variable

From: Daniel Colascione
Subject: Re: Request For Enhancement - TID variable
Date: Thu, 26 Dec 2019 08:48:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/26/19 7:37 AM, Eric S. Raymond wrote:
In attempting to use GNU parallel, with some bash scripts, I
discovered I had a problem with tempfile collisions due to
all of the thread having the same PID.

I was able to come up with a workaround, but...

RFE: bash should have a TID varuable that returns the vakue of gettid(2).

If the bash devs are too busy for this like the idea, I could write
the patch.

Are you sure that'd help? Parallel runs bash in a bunch of subprocesses, so looking at PID would suffice to distinguish jobs. Are you sure you weren't seeing an invariant PID because you were letting the PID variable expansion happen too early?

reply via email to

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