diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-01-06 01:48:54 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-06 01:48:54 +0100 |
commit | 942364957bb40de6f7ef958a9d604f76fb3ee1dc (patch) | |
tree | 66fa450d7b66d6547894d5b733f1f20a7d7ded99 | |
parent | f26931d3c13e326740ea2f7ee78192f737c51742 (diff) | |
download | extrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.tar.gz extrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.tar.xz extrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.zip |
quit when parent specified in -p exits
-rw-r--r-- | extrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extrace.c b/extrace.c index 9753f43..bf7a859 100644 --- a/extrace.c +++ b/extrace.c @@ -440,6 +440,9 @@ handle_msg(struct cn_msg *cn_hdr) pid_t pid = ev->event_data.exit.process_pid; int i; + if (pid == parent) + quit = 1; + for (i = 0; i < PID_DB_SIZE; i++) if (pid_db[i].pid == pid) break; |