httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@prosa.it (David N. Welton)
Subject Re: source in cvs
Date Mon, 18 Dec 2000 20:01:09 GMT
Joe Schaefer <joe@sunstarsys.com> 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
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

Mime
View raw message