| Hi Tito,
I don't see any problems with this, except I wonder would TMPDIR clash
with any other programs' usage of environment variables? On the other
hand, CSTMPDIR or CS_TEMP_DIR seems wordy as well. Just a thought,
it's probably fine to just go with TMPDIR.
Also, I know there was work by John to remove the use of temporary
files a few months ago to support devices that didn't have the
standard access to /tmp (i.e. Android). It looks like from grep that
it's only really being used in:
Top/one_file.c:413: csoundTmpFileName(csound, ST(sconame), ".sco");
Top/one_file.c:414: csoundTmpFileName(csound, extname, ".ext");
Top/one_file.c:510: csoundTmpFileName(csound, ST(midname), ".mid");
which looks like when using CsScore bin="xxx" as well as when writing
out embedded files in tags. Also just a note.
Thanks!
steven
On Sat, Mar 10, 2012 at 11:01 AM, Tito Latini wrote:
> I would like to add the TMPDIR environment variable to `csoundTmpFileName'
> function (unix) because I often use tmpfs and/or ramfs for temp files and
> I don't mount these filesystems on /tmp. I see a tentative with `mytmpnam'
> but it doesn't work because `tmpdir!=NULL' fails (tmpdir is always a string).
> This works
>
> char *tmpdir = getenv("TMPDIR");
> sprintf(buf, "%s/csound-XXXXXX", (tmpdir[0] != '\0' ? tmpdir : "/tmp"));
>
> Let me know if I can apply this change.
>
> tito
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |