Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15783 > unrolled thread

Re: Request For Enhancement - TID variable

Started byDaniel Colascione <dancol@dancol.org>
First post2019-12-26 08:48 -0800
Last post2019-12-26 08:48 -0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Request For Enhancement - TID variable Daniel Colascione <dancol@dancol.org> - 2019-12-26 08:48 -0800

#15783 — Re: Request For Enhancement - TID variable

FromDaniel Colascione <dancol@dancol.org>
Date2019-12-26 08:48 -0800
SubjectRe: Request For Enhancement - TID variable
Message-ID<mailman.1461.1577378926.1979.bug-bash@gnu.org>
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?

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web