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


Groups > gnu.bash.bug > #15783

Re: Request For Enhancement - TID variable

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Daniel Colascione <dancol@dancol.org>
Newsgroups gnu.bash.bug
Subject Re: Request For Enhancement - TID variable
Date Thu, 26 Dec 2019 08:48:33 -0800
Lines 17
Approved bug-bash@gnu.org
Message-ID <mailman.1461.1577378926.1979.bug-bash@gnu.org> (permalink)
References <20191226153751.587634704BBB@snark.thyrsus.com> <ff2cd1e9-b697-415b-97bd-206e44712345@dancol.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1577378927 3288 209.51.188.17 (26 Dec 2019 16:48:47 GMT)
X-Complaints-To action@cs.stanford.edu
To "Eric S. Raymond" <esr@thyrsus.com>, bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pSaVjzIjblloafru0Fg39jVVxX1t5tgYZIrm9L3kcmg=; b=ePOtDqfDKbsDQ5zXfFRivhbFdC Ll/NhoAr357fk12jSNx8C3cZfIL/XfLXtDZpJHLfNfpmHJRes3IOuOC25Us1J2zs1Y6ySDvXlxv2J gyIirLm3wNczGUuA5FFGbrQAoET6M5EudyVsJYcPvLzvpAoqWHVWM/yqb4vqiHGO/G2FTgqjS3JUQ grsed2NrXCd8ojibI6CATFUe0FzoF7JQ9c2he2/iwzfEv+osBtLaTST/sYwn678Hc6KrscQ88uTyd RF+8G7owVrwCgps2Ya8B8Du9DDxEtxU+Lj1IgiyjkN7igdKA5R5mvSk0586HIrlYzo04CQZoZ74jR ccU8zzZg==;
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2
In-Reply-To <20191226153751.587634704BBB@snark.thyrsus.com>
Content-Language en-US
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2600:3c01::f03c:91ff:fedf:adf3
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <ff2cd1e9-b697-415b-97bd-206e44712345@dancol.org>
X-Mailman-Original-References <20191226153751.587634704BBB@snark.thyrsus.com>
Xref csiph.com gnu.bash.bug:15783

Show key headers only | View raw


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?

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web