Use current working directory for temporary executables
authorColin Walters <walters@verbum.org>
Mon, 17 Aug 2009 03:20:14 +0000 (23:20 -0400)
committerColin Walters <walters@verbum.org>
Mon, 17 Aug 2009 03:20:14 +0000 (23:20 -0400)
This avoids /tmp noexec madness.

giscanner/dumper.py

index 0353a2f..622b252 100644 (file)
@@ -76,7 +76,9 @@ class DumpCompiler(object):
     def __init__(self, options, get_type_functions):
         self._options = options
         self._get_type_functions = get_type_functions
-        self._tmpdir = tempfile.mkdtemp('', 'tmp-introspect')
+        # We have to use the current directory to work around Unix
+        # sysadmins who mount /tmp noexec
+        self._tmpdir = tempfile.mkdtemp('', 'tmp-introspect', dir=os.getcwd())
 
         self._compiler_cmd = os.environ.get('CC', 'gcc')
         self._linker_cmd = os.environ.get('LD', self._compiler_cmd)