]> err.no Git - util-linux/commitdiff
mount: use atexit() rather than (*at_die)()
authorKarel Zak <kzak@redhat.com>
Tue, 23 Oct 2007 19:14:59 +0000 (21:14 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Oct 2007 19:50:59 +0000 (21:50 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/fstab.c
mount/mount.c

index 4d045cea08f0518fe04fbeb9f90af1d1e8191b2e..a151df610bb1d8e5fcfe1efd931171722efef4ab 100644 (file)
@@ -536,8 +536,6 @@ lock_mtab (void) {
        struct timeval maxtime;
        char linktargetfile[MOUNTLOCK_LINKTARGET_LTH];
 
-       at_die = unlock_mtab;
-
        if (!signals_have_been_setup) {
                int sig = 0;
                struct sigaction sa;
index 42f87b03e3ac9ee60acdd1166bf13660e409fc6e..ca1238f4859ee6de466a6adb51a389d45034f796 100644 (file)
@@ -1978,6 +1978,8 @@ main(int argc, char *argv[]) {
                create_mtab ();
        }
 
+       atexit(unlock_mtab);
+
        switch (argc+specseen) {
        case 0:
                /* mount -a */