lkml.org 
[lkml]   [1999]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sed not working on /proc files
According to Jeremy Fitzhardinge:
> On 26-Apr-99 Stefan Monnier wrote:
> > open("/proc/meminfo", O_RDONLY) = 3
> > fstat(3, {st_mode=0, st_size=0, ...}) = 0
> > mmap(0, 0, PROT_READ, MAP_PRIVATE, 3, 0) = 0
>
> This is the problem. It stats the file, mmaps 0 bytes from it and finishes
> with no action. Presumeably if the mmap failed or stat said the file isn't a
> regular file it would use normal read.

Hm. Would it be a Bad Thing for mmap to fail on /proc files that
don't report true sizes?
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site