Allow to ignore up to 8 processes in extern debugging mode.

[INTERPRETER]
* NEW: Allow to ignore up to 8 processes in extern debugging mode.
This commit is contained in:
gambas 2022-04-08 03:21:32 +02:00
parent 29dba7dc8c
commit b744c7e193
2 changed files with 13 additions and 1 deletions

View file

@ -113,6 +113,7 @@ void DEBUG_init(void)
const char *fifo_name;
int pid;
int fd_lock;
int n;
if (!EXEC_debug)
{
@ -122,6 +123,15 @@ void DEBUG_init(void)
if (!dir)
return;
for (n = DEBUG_WAIT_IGNORE_MAX; n >= 1; n--)
{
sprintf(COMMON_buffer, DEBUG_WAIT_IGNORE, PROJECT_name, n);
if (unlink(COMMON_buffer) == 0)
return;
}
sprintf(COMMON_buffer, DEBUG_WAIT_LINK, PROJECT_name);
if (unlink(COMMON_buffer))
return;

View file

@ -121,5 +121,7 @@ typedef
#define DEBUG_FIFO_PATTERN FILE_TEMP_PREFIX "/gambas" GAMBAS_VERSION_STRING "-ide-debug-%d.%s"
#define DEBUG_FIFO_PATH_MAX 64
#define DEBUG_WAIT_LINK "/tmp/gambas-%s.debug"
#define DEBUG_WAIT_IGNORE "/tmp/gambas-%s.debug.%d"
#define DEBUG_WAIT_IGNORE_MAX 8
#endif