winedbg: Respect TMPDIR environment variable

Michael Stefaniuc mstefani at redhat.com
Wed Sep 17 04:29:50 CDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/16/2014 09:25 PM, André Hentschel wrote:
> First attack on https://bugs.winehq.org/show_bug.cgi?id=14838
> 
> diff --git a/programs/winedbg/gdbproxy.c
> b/programs/winedbg/gdbproxy.c index 0865f44..d7596a0 100644 ---
> a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@
> -2342,11 +2342,13 @@ static BOOL gdb_exec(const char* wine_path,
> unsigned port, unsigned flags) { char            buf[MAX_PATH]; int
> fd; -    const char*     gdb_path; +    const char      *gdb_path,
> *tmp_path; FILE*           f;
> 
> if (!(gdb_path = getenv("WINE_GDB"))) gdb_path = "gdb"; -
> strcpy(buf,"/tmp/winegdb.XXXXXX"); +    if (!(tmp_path =
> getenv("TMPDIR"))) tmp_path = "/tmp"; +    strcpy(buf, tmp_path); +
> strcat(buf, "/winegdb.XXXXXX");
Just wondering, as we already have the .wine-$UID directory in TMPDIR
shouldn't this file be placed in that directory too?

> fd = mkstemps(buf, 0); if (fd == -1) return FALSE; if ((f =
> fdopen(fd, "w+")) == NULL) return FALSE;
> 

bye
	michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iD8DBQFUGVSO0ei8kcpE1VERAgC/AJ9Ow9H7xnu/qQ3VYlh49BXOgG75pACePrh7
aLhMgo8NZ7EhpQCB2cs8NnY=
=OHEq
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list