bug-enscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-enscript] enscript and temp file location


From: Giulio Orsero
Subject: Re: [bug-enscript] enscript and temp file location
Date: Wed, 30 Apr 2008 10:26:02 +0200

On Fri, Apr 25, 2008 at 11:36 PM, Shawn McMahon <address@hidden> wrote:

> Why wouldn't we just use the simpler example:
>
> char *filename;
>  int fd;
>
>  do {
>   filename = tempnam (NULL, "foo");
>   fd = open (filename, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0600);
>   free (filename);
>  } while (fd == -1);

I'm not a C programmer, could you tell me how I switch from

    static FILE *divertfp = NULL;
    divertfp = tmpfile ();
to your example?

I can substitute the current instruction with the new ones, but then
how I convert from "int something" to "FILE *something" (

Thanks

ps: I have no issues with security or untrusted users, just need to
put the temp files where I need them to be.





-- 
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]