diff --git a/proj/intercept/src/intercept.c b/proj/intercept/src/intercept.c index fe2a6fc..89606cb 100644 --- a/proj/intercept/src/intercept.c +++ b/proj/intercept/src/intercept.c @@ -887,7 +887,7 @@ static void init(void) { intercept = STDERR_FILENO; mode = 2; } else if (val && strncmp(val, "file:", 5) == 0) { - if ((intercept = open(val + 5, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) { + if ((intercept = open(val + 5, O_CREAT | O_APPEND | O_WRONLY, 0644)) == -1) { fprintf(stderr, "intercept: unable to open log file '%s': %s\n" "intercept: not logging or manipulating function/system calls\n", val + 5, strerror(errno)); errno = 0; mode = -1;