set FIOCLEX on /dev/kmem file when getting load average
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1983 06:38:15 +0000 (22:38 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 29 Aug 1983 06:38:15 +0000 (22:38 -0800)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 4.4
SCCS-vsn: usr.sbin/sendmail/src/version.c 4.8

usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/version.c

index b775fbd..45faea0 100644 (file)
@@ -1,4 +1,5 @@
 # include <pwd.h>
 # include <pwd.h>
+# include <sys/ioctl.h>
 # include "sendmail.h"
 
 /*
 # include "sendmail.h"
 
 /*
@@ -33,7 +34,7 @@
 
 
 
 
 
 
-SCCSID(@(#)conf.c      4.3             %G%);
+SCCSID(@(#)conf.c      4.4             %G%);
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
 \f/*
 **  Header info table
 **     Final (null) entry contains the flags used for any other field.
@@ -455,6 +456,8 @@ rlsesigs()
 \f/*
 **  GETLA -- get the current load average
 **
 \f/*
 **  GETLA -- get the current load average
 **
+**     This code stolen from la.c.
+**
 **     Parameters:
 **             none.
 **
 **     Parameters:
 **             none.
 **
@@ -486,6 +489,7 @@ getla()
                kmem = open("/dev/kmem", 0);
                if (kmem < 0)
                        return (-1);
                kmem = open("/dev/kmem", 0);
                if (kmem < 0)
                        return (-1);
+               (void) ioctl(kmem, FIOCLEX, 0);
                nlist("/vmunix", Nl);
                if (Nl[0].n_type == 0)
                        return (-1);
                nlist("/vmunix", Nl);
                if (Nl[0].n_type == 0)
                        return (-1);
index 03ed4c6..d40ebdf 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char    SccsId[] = "@(#)SendMail version 4.7 of %G%";
+static char    SccsId[] = "@(#)SendMail version 4.8 of %G%";
 # endif lint
 
 # endif lint
 
-char   Version[] = "4.7";
+char   Version[] = "4.8";