Crashcatcher: create temp file in /tmp, not working directory (which may not have write access)

deque
scrawl 11 years ago
parent f935cfc6c9
commit 47bd170d7e

@ -128,7 +128,7 @@ static void gdb_info(pid_t pid)
int fd;
/* Create a temp file to put gdb commands into */
strcpy(respfile, "gdb-respfile-XXXXXX");
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != NULL)
{
fprintf(f, "attach %d\n"

Loading…
Cancel
Save