summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-01-06 01:48:54 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-01-06 01:48:54 +0100
commit942364957bb40de6f7ef958a9d604f76fb3ee1dc (patch)
tree66fa450d7b66d6547894d5b733f1f20a7d7ded99
parentf26931d3c13e326740ea2f7ee78192f737c51742 (diff)
downloadextrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.tar.gz
extrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.tar.xz
extrace-942364957bb40de6f7ef958a9d604f76fb3ee1dc.zip
quit when parent specified in -p exits
-rw-r--r--extrace.c3
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;