Hi Dale -- > When I try to send e-mail to Bill at: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] > 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. Cheers, Susan ================================================== Date: Thu, 30 May 96 17:30 CDT From: Mike Coleman <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED], debian-devel@lists.debian.org, [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: psutils and pipes bug Date: Thu, 30 May 1996 12:29:03 -0500 From: Lukas Nellen <[EMAIL PROTECTED]> 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 relevant? 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.) --Mike P.S. One of the debian.* files mentions [EMAIL PROTECTED] as the package maintainer. Is this really the same as [EMAIL PROTECTED] 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 ; #endif @@ -90,8 +91,9 @@ if (_fstat(fileno(fp), &fs) == 0 && (fs.st_mode&_S_IFREG) != 0) return (fp); #else - 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); #endif #if defined(MSDOS)