Because exit(3) calls registered destructors of gcc, it calling it in lock_and_daemon() conflicts with LTTng. This patch let the function use _exit(2) for avoiding this problem.
Cc: Gu Ping <[email protected]> Signed-off-by: Hitoshi Mitake <[email protected]> --- sheep/sheep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sheep/sheep.c b/sheep/sheep.c index 9fc7610..9471a3b 100644 --- a/sheep/sheep.c +++ b/sheep/sheep.c @@ -571,7 +571,7 @@ static int lock_and_daemon(bool daemonize, const char *base_dir) if (ret != sizeof(status)) panic("read exit status failed: %m"); - exit(status); + _exit(status); break; } @@ -589,7 +589,7 @@ static int lock_and_daemon(bool daemonize, const char *base_dir) status = 1; goto end; default: - exit(0); + _exit(0); break; } -- 1.9.1 -- sheepdog mailing list [email protected] https://lists.wpkg.org/mailman/listinfo/sheepdog
