wanted: open-temp-file and with-temp-file
Bug #393104 reported by
Tobias C. Rittweiler
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I think SBCL should provide SB-EXT:
It should be based on tmpfile(3) on Unix, and whatever Windows provides.
I regularly see code that uses something like (open (make-temp-
contain a race condition that can be abused as a DoS attack -- depending on the
implementation of OPEN and :IF-EXISTS. SBCL seems to do it right, passing O_EXCL and
O_CREATE to open(3).
Providing such a function, and documenting it appropriately, may rise attention of the
problem. And, of course, it would be convenient for a need that comes up quite frequently.
To post a comment you must log in.
Hi,
We've been using
;; Generate unique filename for temporary usage define- alien-routine "tmpnam" sb-alien:c-string c-string) ))
(sb-alien:
(dest (* sb-alien:
in Core Server project (http:// labs.core. gen.tr) but it seems we are getting errors. It would be nice to have some convenient way.