From: Bruno Faccini Date: Mon, 5 Jan 2015 16:42:05 +0000 (+0100) Subject: LU-6080 utils: copytool to also unregister FIFO upon signal X-Git-Tag: 2.6.93~77 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=02121ce3e801684b4b5602a55ca313c661471df7;p=fs%2Flustre-release.git 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 --- 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); }