From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/1153 Path: main.gmane.org!not-for-mail From: "Gilbert van den Dobbelsteen" Newsgroups: gmane.comp.tex.context Subject: Re: temp file name conflicts in unattended document generation Date: Thu, 4 Nov 1999 10:15:37 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <002701bf26a5$282a8dc0$0c01a8c1@loginbv.com> 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="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035391992 30360 80.91.224.250 (23 Oct 2002 16:53:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:53:12 +0000 (UTC) Cc: "Context List" Original-To: "Ed L. Cashin" Xref: main.gmane.org gmane.comp.tex.context:1153 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:1153 > 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. Right, that's what I'll be using in the future (when our new linux server arrives). I will be using mod-perl for generating labels from forms input. I am not sure if context is the path for our company, since what we need is pretty trivial, and can easily be made using pdflib. On the other hand, I can easily use plain pdftex, since this generates pdf files at high speed. > > 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. Taco's solution is very promising for the web-server approach. one can easily obtain a unique client id, and run the stuff in different directories, based on that id. Gilbert.