diff options
author | Michele Calgaro <[email protected]> | 2021-09-20 23:25:12 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-09-20 23:25:12 +0900 |
commit | 7c1e81c883aff4e2501fea6b855cb2fb0fecfa67 (patch) | |
tree | 5417e75224ea9994c0925e7c395007fc73c69bd5 | |
parent | cf63191672fff12cd57892ba4642ed4f01e9c6a4 (diff) | |
download | tdesdk-7c1e81c883aff4e2501fea6b855cb2fb0fecfa67.tar.gz tdesdk-7c1e81c883aff4e2501fea6b855cb2fb0fecfa67.zip |
ktrace: let both parent and child processes write into the log file.
This makes sure all malloc/realloc/free operations are correctly logged,
although there is a summary section for each process.
As a rule of thumb, when monitoring malloc operations it is recommended
to run the program with the '--nofork' argument to avoid the fork
operation in first place.
Signed-off-by: Michele Calgaro <[email protected]>
-rw-r--r-- | kmtrace/ktrace.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/kmtrace/ktrace.c b/kmtrace/ktrace.c index dcc321e5..699d1571 100644 --- a/kmtrace/ktrace.c +++ b/kmtrace/ktrace.c @@ -816,24 +816,6 @@ kuntrace() write(2, "kuntrace()\n", 11); } -int fork() -{ - int result; - if (mallstream) - fflush(mallstream); - result = __fork(); - if (result == 0) - { - if (mallstream) - { - close(fileno(mallstream)); - mallstream = NULL; - } - } - return result; -} - - static int my_mcount_lock = 0; void mcount() { |