View Single Post
  #7 (permalink)  
Old May 22nd 15, 01:57 PM posted to uk.comp.os.linux,uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default Flac and Audio CD Health Checks

In article
wwvlhggrcx4.fsf@l1AntVDjLrnP7Td3DQJ8ynzIq3lJMueXf 87AxnpFoA.invalid,
Richard Kettlewell wrote:

1. If the environment variable TMPDIR is set, use that instead of /tmp.


2. Don't use predictable filenames; /tmp is shared between multiple
users. (Get this wrong and you will introduce security problems.)


If you don't care about the filename, the easiest policy is to use
tmpfile(). That'll given you an anonymous file somewhere sensible.


I'm not clear how that would work for my requirement. I'm using system() to
launch flac and have it put its output into a file which I specify by its
name. Then my main program uses that name to fopen() the file and read from
it.

AIUI tmpfile() will give me a file 'handle' (FILE*) but no name. How would
I use that as part of the command string for flac?

I did find a man page for tmpname() but having given the details it says to
"Never use it!".

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html