From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1151 Path: main.gmane.org!not-for-mail From: ecashin@coe.uga.edu (Ed L. Cashin) Newsgroups: gmane.comp.tex.context Subject: Re: temp file name conflicts in unattended document generation Date: 03 Nov 1999 14:50:31 -0500 Sender: owner-ntg-context@let.uu.nl Message-ID: References: <381E1496.5A90@wxs.nl> <199911021104.MAA01352@servalys.hobby.nl> <000b01bf2531$541bda80$0c01a8c1@loginbv.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035391990 30358 80.91.224.250 (23 Oct 2002 16:53:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:53:10 +0000 (UTC) Cc: "Context List" Original-To: "Gilbert van den Dobbelsteen" Xref: main.gmane.org gmane.comp.tex.context:1151 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1151 Gilbert van den Dobbelsteen writes: > For Hans: $$ returns the curent process Id in unix, which is > guaranteed to be unique. Disclaimer: although somewhat relevant to a discussion of unique identifiers for document-generation runs, this is a bit off topic. Unique by process, yes, but an interesting development in perl is mod-perl, where the compiled perl resides inside the web server process until the web server dies. That means that different invocations of the same perl code with the same process id (viz., the web server's) could be producing different documents. So often I avoid the $$ technique for CGI and use a random letter/number plus lockfiles instead. I like Taco's suggestion of using a directory name that contains the identifier for a given run. -- --Ed Cashin PGP public key: ecashin@coe.uga.edu http://www.coe.uga.edu/~ecashin/pgp/