From 6c9df4c423090ee1800c18f6736bf46ff3229341 Mon Sep 17 00:00:00 2001 From: gambas Date: Thu, 21 Mar 2019 23:14:22 +0100 Subject: [PATCH] Cosmetic changes in debugger code. [INTERPRETER] * NEW: Cosmetic changes in debugger code. [GB.DEBUG] * NEW: Cosmetic changes in debugger code. --- main/lib/debug/CDebug.c | 10 ++++------ main/share/gb_file_temp.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main/lib/debug/CDebug.c b/main/lib/debug/CDebug.c index 7154f03d3..31ddb053b 100644 --- a/main/lib/debug/CDebug.c +++ b/main/lib/debug/CDebug.c @@ -129,13 +129,13 @@ static void callback_read(int fd, int type, intptr_t param) static char *input_fifo(char *path) { - sprintf(path, "/tmp/gambas.%d/%d.in", getuid(), getpid()); + sprintf(path, FILE_TEMP_PREFIX "/%d.in", getuid(), getpid()); return path; } static char *output_fifo(char *path) { - sprintf(path, "/tmp/gambas.%d/%d.out", getuid(), getpid()); + sprintf(path, FILE_TEMP_PREFIX "/%d.out", getuid(), getpid()); return path; } @@ -146,16 +146,14 @@ BEGIN_METHOD_VOID(CDEBUG_begin) signal(SIGPIPE, SIG_IGN); - input_fifo(path); - unlink(path); + unlink(input_fifo(path)); if (mkfifo(path, 0600)) { GB.Error("Cannot create input fifo in /tmp: &1", strerror(errno)); return; } - output_fifo(path); - unlink(path); + unlink(output_fifo(path)); if (mkfifo(path, 0600)) { GB.Error("Cannot create output fifo in /tmp: &1", strerror(errno)); diff --git a/main/share/gb_file_temp.h b/main/share/gb_file_temp.h index c2357d9a8..75a82576e 100644 --- a/main/share/gb_file_temp.h +++ b/main/share/gb_file_temp.h @@ -1285,3 +1285,4 @@ char *FILE_get_home(void) return _home; } +