title: set directory of tmpfile() on Linux
body: <p>A program I use is failing when it uses <a href="http://linux.die.net/man/3/tmpfile" rel="nofollow noreferrer">tmpfile()</a> for large files. The problem seems to be I don't have permission to create large files in /tmp, which this function uses by default. So is there a way, perhaps with an environmental variable, that I can make tmpfile() write to a different location?</p>
  
  <p>Edit: the program in question is <a href="http://sox.sourceforge.net/" rel="nofollow noreferrer">sox</a>, which uses C.</p>