configure time, via the --with-tmpdir flag. The configure.in part of
this was mistakenly committed already in r11872 as first hunk of the
configure.in change. Bug 266035 comment 11. (Kenny Root,
kroot@google.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11881
while (True) {
if (tries++ > 10)
return -1;
- VG_(sprintf)( buf, "/tmp/valgrind_%s_%08x",
- part_of_name, VG_(random)( &seed ));
+ VG_(sprintf)( buf, "%s/valgrind_%s_%08x",
+ VG_TMPDIR, part_of_name, VG_(random)( &seed ));
if (0)
VG_(printf)("VG_(mkstemp): trying: %s\n", buf);
VG_(sprintf)(buf, "proc_%d_cmdline", VG_(getpid)());
fd = VG_(mkstemp)( buf, buf2 );
if (fd == -1)
- VG_(err_config_error)("Can't create client cmdline file in /tmp.");
+ VG_(err_config_error)("Can't create client cmdline file in " VG_TMPDIR);
nul[0] = 0;
exename = VG_(args_the_exename) ? VG_(args_the_exename)
/* Now delete it, but hang on to the fd. */
r = VG_(unlink)( buf2 );
if (r)
- VG_(err_config_error)("Can't delete client cmdline file in /tmp.");
+ VG_(err_config_error)("Can't delete client cmdline file in " VG_TMPDIR);
VG_(cl_cmdline_fd) = fd;
}