[webkit-dev] File::Spec->tmpdir() on Leopard and Snow Leopard bots

David Kilzer ddkilzer at webkit.org
Fri Jan 8 07:49:00 PST 2010


On Fri, January 8, 2010 at 12:39:41 AM, Andras Becsi wrote:

>   in the process of making it possible to run more than one instance of 
> run-webkit-tests at the same time 
> (https://bugs.webkit.org/show_bug.cgi?id=33153), I'm trying to make the handling 
> of running httpd processes more platform independent.
> My tries failed only on the Leopard bots. Unfortunately I have no access to a 
> Leopard machine, so I had to guess, but now I have a strong supposition why the 
> new script fails.
> The Leopard bots (Leopard and Snow Leopard) have set something like this: 
> TMPDIR=/var/folders/FF/FFsVLEwYHre8vU9Sax877k+++TI/-Tmp-/ shown in the bot logs 
> (http://build.webkit.org/builders/SnowLeopard%20Intel%20Release%20%28Tests%29/builds/4018/steps/layout-test/logs/stdio).
> My assumption is, that calling File::Spec->tmpdir() in perl returns this path, 
> not /tmp as expected, that is why there is no PID file where the script expects 
> it to be (httpd.conf sets it to /tmp/WebKit).
> Is there any particular reason for setting a non-POSIX standard TMPDIR on these 
> machines, especially because Tiger does not set this and thus has no problems 
> with File::Spec->tmpdir()? Or am I wrong with my assumption?


On Leopard and newer, the tmp directory under /var/folders is a per-user tmp directory (IIRC), which the Perl module apparently prefers over the shared tmp directory at /tmp.

If you read the man page for File::Spec, tmpdir() simply returns the first directory in a list, and its implementation is platform-specific.  It sounds like this method should not be used if there is code that expects the same directory to be returned on every platform.

Dave



More information about the webkit-dev mailing list