From e083fdfef42414cb1163d95b59f1d43a44fe0dbe Mon Sep 17 00:00:00 2001 From: Kamil Burzynski Date: Tue, 7 Nov 2017 18:51:09 +0100 Subject: [PATCH] [posix] clear pending alarms in posix platform which could persist execve call (#2323) --- examples/platforms/posix/misc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/platforms/posix/misc.c b/examples/platforms/posix/misc.c index 38d41ee9e..ec0b6d7e7 100644 --- a/examples/platforms/posix/misc.c +++ b/examples/platforms/posix/misc.c @@ -55,6 +55,8 @@ void otPlatReset(otInstance *aInstance) platformRadioDeinit(); platformUartRestore(); + alarm(0); + execvp(argv[0], argv); perror("reset failed"); exit(EXIT_FAILURE);