On Jul 29, 2011, at 12:04, Chris K. Jester-Young wrote: > On Fri, Jul 29, 2011 at 09:07:43AM +0200, Andy Wingo wrote: >> What should we do here? > > There's two ways I can think of: > > 1. Basically reimplement the functionality of tmpfile, using mkstemp > and unlink, passing the fd to scm_fdes_to_port as before. This does > require reimplementing the TMPDIR lookup stuff (since that doesn't > seem to be exposed by libc). > > 2. Use tmpfile as before, dup the file descriptor, and close the stdio > stream unconditionally. This is wasteful of a file stream in that > one gets created only to be immediately destroyed, but it's more > faithful to the system-provided tmpfile, quirks and all.
Better check whether these will work on Windows, where file deletion interacts differently than on UNIX. Ken
