proj/intercept.c: Append to log file when logging to file
This commit is contained in:
@@ -887,7 +887,7 @@ static void init(void) {
|
|||||||
intercept = STDERR_FILENO;
|
intercept = STDERR_FILENO;
|
||||||
mode = 2;
|
mode = 2;
|
||||||
} else if (val && strncmp(val, "file:", 5) == 0) {
|
} 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));
|
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;
|
errno = 0;
|
||||||
mode = -1;
|
mode = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user