Check if a signal was received when waiting for ptp4l in the automatic mode to not get stuck in an infinite loop.
Signed-off-by: Miroslav Lichvar <mlich...@redhat.com> --- phc2sys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phc2sys.c b/phc2sys.c index 3a82cfe..9e51e82 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -1148,6 +1148,8 @@ static int auto_init_ports(struct node *node, int add_rt) char iface[IFNAMSIZ]; while (1) { + if (!is_running()) + return -1; res = run_pmc_clock_identity(node, 1000); if (res < 0) return -1; -- 2.14.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel