2006-07-06 Jim Hyslop <jhyslop@dreampossible.ca> (tiny change)
[gnulib.git] / lib / readutmp.c
index ca4472c..634d9ab 100644 (file)
@@ -17,7 +17,9 @@
 
 /* Written by jla; revised by djm */
 
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "readutmp.h"
 
@@ -68,6 +70,7 @@ static inline bool
 desirable_utmp_entry (STRUCT_UTMP const *u, int options)
 {
   return ! (options & READ_UTMP_CHECK_PIDS
+           && IS_USER_PROCESS (u)
            && (UT_PID (u) <= 0
                || (kill (UT_PID (u), 0) < 0 && errno == ESRCH)));
 }