Currently on DOSISH machines a -e line with a syntax error results in
persisting pl234523 tmpfile. The patch below:
a) Cleans up the cleanup code;
b) Moves the TMPPATH specifics to header files.
I do not send patches for OS/2 files, since they are very much
reworked now, I only note that b) allows OS/2 startup to specify
TMPPATH to look to a $ENV{TMP} directory (instead of the current
directory, as it is now). Note that this allows now running -e perl
from read-only media.
Since there is no place now to have DOSISH _code_, as opposed to
_headers_, I leave the TMPPATH code on ./os2/os2.c, though it should
be common to DOS as well.
Enjoy,
Ilya
#define BIT_BUCKET "/dev/null" /* Will this work? */
#define PERL_SYS_INIT(c,v)
+#define TMPPATH "plXXXXXX"
/*
* fwrite1() should be a routine with the same calling sequence as fwrite(),
}
fputs(message, stderr);
(void)fflush(stderr);
- if (e_fp)
+ if (e_fp) {
+#ifdef DOSISH
+ fclose(e_fp);
+#endif
(void)UNLINK(e_tmpname);
+ }
statusvalue = SHIFTSTATUS(statusvalue);
#ifdef VMS
my_exit((U32)vaxc$errno?vaxc$errno:errno?errno:statusvalue?statusvalue:SS$_ABORT);