[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't contact Bill Mitchell

Hi Dale --

> When I try to send e-mail to Bill at: mitchell@mdd.comm.mot.com I get a no
> such user error. Does anyone have a good contact address for Bill?

Bill sent a message to debian-devel a few days ago from this address:


> Better yet, does anyone have a copy of the patch we did on less to fix the
> problem reading proc files?

I think this is the message you are looking for is the one attached below.


Date: Thu, 30 May 96 17:30 CDT
From: Mike Coleman <coleman@chez-gnu.cstp.umkc.edu>
To: lukas@teorica0.ifisicacu.unam.mx
CC: dwarf@polaris.net, debian-devel@lists.debian.org,
Cc: angus@harlequin.co.uk
Subject: Re: psutils and pipes bug

   Date: Thu, 30 May 1996 12:29:03 -0500
   From: Lukas Nellen <lukas@teorica0.ifisicacu.unam.mx>

   Unfortunately, that doesn't solve the problem. Could the problem be
   related to the libraries you link psutils with? The version of libc on
   my system is:
	   libc5           5.2.18-6 
   which is the only shared library used by psnup and pstops. Or could
   there be another difference between our systems which might be

The problem seems to be one or both of: (1) a change in the way psutils
decides whether a file is seekable or not, and (2) libc's (possibly changed)
optimization of fseeks.

Specifically, the current version of psutils decides whether a file is
seekable by SEEK_CUR with 0 as the arg (which is a no-op seek to the current
position), checking to see whether this generates an error.  Libc, however,
optimizes this fseek away (i.e., without calling lseek), and doesn't generate
an error.

The attached patch seems like a reasonable fix.  It tests seekability by
seeking to EOF and back to the current point, checking for errors.

(I'm also Cc:'ing Angus (author of psutils) on this.)


P.S.  One of the debian.* files mentions dwarf@polaris.com as the package
maintainer.  Is this really the same as dwarf@polaris.net or a typo?

--- psutil.c~	Mon Feb 19 11:27:19 1996
+++ psutil.c	Thu May 30 17:15:16 1996
@@ -82,6 +82,7 @@
    FILE *ft;
    long r, w;
    char *p;
+   long fp_pos;
 #if defined(WINNT)
    struct _stat fs ;
@@ -90,8 +91,9 @@
    if (_fstat(fileno(fp), &fs) == 0 && (fs.st_mode&_S_IFREG) != 0)
      return (fp);
-   if (!fseek(fp, 0L, SEEK_CUR))
-     return (fp);
+   if ((fp_pos = ftell(fp)) >= 0)
+      if (!fseek(fp, 0L, SEEK_END) && !fseek(fp, fp_pos, SEEK_SET))
+	 return (fp);
 #if defined(MSDOS)

Reply to: