Skip to content
Snippets Groups Projects
Commit ef62a97e authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-05-11 13:30:11 by simonmar]

Try to avoid clashes with files already in $TMPDIR.
parent 0eb4bba1
No related merge requests found
...@@ -158,7 +158,14 @@ $SIG{'QUIT'} = 'quit_upon_signal'; ...@@ -158,7 +158,14 @@ $SIG{'QUIT'} = 'quit_upon_signal';
: "$TopPwd/${CURRENT_DIR}" ); : "$TopPwd/${CURRENT_DIR}" );
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$$"); # Try to find a $Tmp_prefix which isn't being used...
$tmp = $$;
do {
$Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$tmp");
$tmp++;
} while ( -e "$Tmp_prefix.hc" ||
-e "$Tmp_Prefix.s" ||
-e "$Tmp_Prefix.hi" );
} else { } else {
print STDERR "TMPDIR has not been set to anything useful!\n" if (${TMPDIR} eq ''); print STDERR "TMPDIR has not been set to anything useful!\n" if (${TMPDIR} eq '');
$Tmp_prefix ="${TMPDIR}/ghc$$"; # TMPDIR set via Makefile when booting.. $Tmp_prefix ="${TMPDIR}/ghc$$"; # TMPDIR set via Makefile when booting..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment