From 02121ce3e801684b4b5602a55ca313c661471df7 Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Mon, 5 Jan 2015 17:42:05 +0100 Subject: [PATCH] LU-6080 utils: copytool to also unregister FIFO upon signal Copytool should also call llapi_hsm_unregister_event_fifo() upon termination signal handling, to close FIFO and also unlink it if transient. Signed-off-by: Bruno Faccini Change-Id: I61add8719004a3126aee82accb0bf1267d8eb612 Reviewed-on: http://review.whamcloud.com/13236 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Henri Doreau Reviewed-by: jacques-Charles Lafoucriere Reviewed-by: Oleg Drokin --- lustre/utils/lhsmtool_posix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/utils/lhsmtool_posix.c b/lustre/utils/lhsmtool_posix.c index c0229d7..db0dd98 100644 --- a/lustre/utils/lhsmtool_posix.c +++ b/lustre/utils/lhsmtool_posix.c @@ -1774,6 +1774,10 @@ static void handler(int signal) * does successfully unmount and the mount is actually gone, but the * mtab entry remains. So this just makes mtab happier. */ llapi_hsm_copytool_unregister(&ctdata); + + /* Also remove fifo upon signal as during normal/error exit */ + if (opt.o_event_fifo != NULL) + llapi_hsm_unregister_event_fifo(opt.o_event_fifo); _exit(1); } -- 1.8.3.1