diff options
author | Karel Zak | 2017-06-29 12:58:57 +0200 |
---|---|---|
committer | Karel Zak | 2017-06-29 12:58:57 +0200 |
commit | 41d758f82d2e5e0a3f5c87c58cb3ca4eacc80d9b (patch) | |
tree | e084d122a9a057c7913fea137d0475267249c161 /libmount/src/context_mount.c | |
parent | docs: correct line(1) deprecation comment (diff) | |
download | kernel-qcow2-util-linux-41d758f82d2e5e0a3f5c87c58cb3ca4eacc80d9b.tar.gz kernel-qcow2-util-linux-41d758f82d2e5e0a3f5c87c58cb3ca4eacc80d9b.tar.xz kernel-qcow2-util-linux-41d758f82d2e5e0a3f5c87c58cb3ca4eacc80d9b.zip |
libmount: use _exit() in <type> handlers
The originally used exit() is bad idea for the shared library.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r-- | libmount/src/context_mount.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 2c5334217..65f7dbfd0 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -597,10 +597,10 @@ static int exec_helper(struct libmnt_context *cxt) int i = 0; if (setgid(getgid()) < 0) - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); if (setuid(getuid()) < 0) - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); type = mnt_fs_get_fstype(cxt->fs); @@ -632,7 +632,7 @@ static int exec_helper(struct libmnt_context *cxt) i, args[i])); DBG_FLUSH; execv(cxt->helper, (char * const *) args); - exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } default: { @@ -1244,7 +1244,7 @@ int mnt_context_next_mount(struct libmnt_context *cxt, if (mnt_context_is_child(cxt)) { DBG(CXT, ul_debugobj(cxt, "next-mount: child exit [rc=%d]", rc)); DBG_FLUSH; - exit(rc); + _exit(rc); } return 0; } |