Article View: net.eunice
Article #112temporary file names
From: Keith Bostic
Date: Mon, 17 Sep 1984 22:08
Date: Mon, 17 Sep 1984 22:08
22 lines
1196 bytes
1196 bytes
Just got back from a news vacation -- found a long ago article suggesting
that people use mktemp(3) to produce unique file names -- and a small
program that allowed it to be called from the shell.
This is a dangerous fix on EUNICE machines. The EUNICE shell does not
increment process id's as expected under UNIX. Just as an example:
#include <stdio.h>
main()
{
static char buf[] = "fileXXXXXX";
char *mktemp();
printf("file name: %s\n",mktemp(buf));
}
when run twice in a row will produce the same file name.
Keith
ARPA: keith@seismo
UUCP: seismo!keith
Technical Details
Message-ID:
<4006@seismo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!amd!dual!qantel!intelca!hplabs!hao!seismo!keithShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/12/84; site seismo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!amd!dual!qantel!intelca!hplabs!hao!seismo!keith From: keith@seismo.UUCP (Keith Bostic) Newsgroups: net.eunice Subject: temporary file names Message-ID: <4006@seismo.UUCP> Date: Mon, 17-Sep-84 18:08:51 EDT Article-I.D.: seismo.4006 Posted: Mon Sep 17 18:08:51 1984 Date-Received: Wed, 26-Sep-84 00:38:44 EDT Distribution: net Organization: Center for Seismic Studies, Arlington, VA Lines: 22