Sorry to bother you again, but I'd appreciate it if you could make one
more quick fix to chkutmp.c.  Specifically, I've found that because ps
normally sorts by PID, restarted processes (most commonly X in my case)
can appear in different positions in different runs.  The following
patch compensates by using ps's k option to specify a different sort
order (which you're welcome to tweak to suit your taste); could you
please apply it as well?  (I left the Solaris command line as is because
its ps does not have any such option AFAICT.)

--- chkutmp.c~  2009-08-22 18:14:11.000000000 -0400
+++ chkutmp.c   2009-08-26 10:26:46.000000000 -0400
@@ -70,7 +70,7 @@
 };
 static char *cmd[] = {
     "ps -ef -o \"tty,pid,ruser,args\"",        /* solaris */
-    "ps ax -o \"tty,pid,ruser,args\""  /* linux */
+    "ps axk \"tty,ruser,args\" -o \"tty,pid,ruser,args\""      /* linux */
 };
 int fetchps(struct ps_line *);
 int fetchutmp(struct utmp_line *);

Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger a...@monk.mit.edu (NOT a valid e-mail address) for more info.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to