In the era of remote work the different terminal connections are used for
testing and debugging linuxptp based solutions. Particularly one of the
setup is based on xterm when a set are HW platforms remotely configured and
linuxptp based SW started. When restart of xterm sessions happens the
linuxptp based SW does not receive any of SIGINT/SIGQUIT/SIGTERM signal and
as result left in unpredictable state which causes automation tests failure
after restart and required reboot to recover.
The Xterm will notify its child process with a SIGHUP ("hangup") before it
exits, hence add registration of SIGHUP handler to fix an issue.
Signed-off-by: Grygorii Strashko <[email protected]>
---
util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util.c b/util.c
index 027d694..113467d 100644
--- a/util.c
+++ b/util.c
@@ -582,6 +582,10 @@ int handle_term_signals(void)
fprintf(stderr, "cannot handle SIGTERM\n");
return -1;
}
+ if (SIG_ERR == signal(SIGHUP, handle_int_quit_term)) {
+ fprintf(stderr, "cannot handle SIGHUP\n");
+ return -1;
+ }
return 0;
}
--
2.17.1
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel