httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David N. Welton)
Subject Re: source in cvs
Date Mon, 18 Dec 2000 20:01:09 GMT
Joe Schaefer <> writes:

> I'm not sure where this comes from- neither my man pages nor my
> glibc2 info documentation say this.  Quite frankly, I'd ignore it
> since it's utter BS. On linux, "mkstemp" is just as good as
> "tmpfile" since it's coded as "tmpfile" + "remove" - thus the file
> is gone once the stream to it is closed.  IME, mkstemp works just
> fine on linux.

Hrmm, I don't think it's removed.

#include <stdio.h>

int main()
    int fd = 0;
    char storage[100] = "/tmp/testXXXXXX";
    fd = mkstemp(storage);
    write(fd, "123456789\n", strlen("123456789\n"));

    printf("file is %s\n", storage);
    close (fd);

I still have the files sitting around, complete with contents.

I don't know... I like the idea of giving someone a filename and
letting them do what they want with it, which may or may not include
opening the file.

David N. Welton
Free Software: 
   Apache Tcl: 

View raw message