do not complain if mountd is not found
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 20 Apr 1994 14:48:38 +0000 (06:48 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 20 Apr 1994 14:48:38 +0000 (06:48 -0800)
SCCS-vsn: sbin/mount/mount.c 8.19

usr/src/sbin/mount/mount.c

index df0a2a6..a8a5b79 100644 (file)
@@ -12,7 +12,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)mount.c    8.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)mount.c    8.19 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -206,7 +206,7 @@ main(argc, argv)
        if (rval == 0 && getuid() == 0 &&
            (mountdfp = fopen(_PATH_MOUNTDPID, "r")) != NULL) {
                if (fscanf(mountdfp, "%ld", &pid) == 1 &&
        if (rval == 0 && getuid() == 0 &&
            (mountdfp = fopen(_PATH_MOUNTDPID, "r")) != NULL) {
                if (fscanf(mountdfp, "%ld", &pid) == 1 &&
-                    pid > 0 && kill(pid, SIGHUP))
+                    pid > 0 && kill(pid, SIGHUP) == -1 && errno != ESRCH)
                        err(1, "signal mountd");
                (void)fclose(mountdfp);
        }
                        err(1, "signal mountd");
                (void)fclose(mountdfp);
        }