Excerpts from Norbert Hartl's message of 2015-03-19 14:09:28 +0100:
> That's my point. Or better I like to know how the plugin can distinguish
> them. Usually there shouldn't be a difference. I know the /proc filesystem.
> It is what unix is all about. Make every information available as file. You
> say it is a virtual filesystem? Yes, but there are only virtual filesystems
> in linux. Below is always a device driver accessing disks, cdroms, etc.
> Memory or the kernel does not make a difference. They are all the same and
> they should according to unix. So I still not understand the problem.

files in /proc are not seekable. 
that or something related may be the problem.

compare this strace:

/proc/uptime:
lstat64("/proc/uptime", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/uptime", O_RDONLY)          = 8
fstat64(8, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xfffffffff722e000
fstat64(8, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
close(8)                                = 0

/etc/profile:
lstat64("/etc/profile", {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
open("/etc/profile", O_RDONLY)          = 8
fstat64(8, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xfffffffff722e000
fstat64(8, {st_mode=S_IFREG|0644, st_size=1750, ...}) = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
read(8, "# /etc/profile\n\n# System wide en"..., 1750) = 1750
_llseek(8, 1750, [1750], SEEK_SET)      = 0
_llseek(8, 1750, [1750], SEEK_SET)      = 0
read(8, "", 4096)                       = 0
_llseek(8, 0, [0], SEEK_SET)            = 0
close(8)                                = 0

/proc/uptime comes with a filesize of 0, and this, pharo tries to read 0 bytes 
from it.
or rather, since there is no read() call, it concludes that there is nothing to 
read.

greetings, martin.

-- 
eKita                   -   the online platform for your entire academic life
-- 
chief engineer                                                       eKita.co
pike programmer      pike.lysator.liu.se    caudium.net     societyserver.org
secretary                                                      beijinglug.org
mentor                                                           fossasia.org
foresight developer  foresightlinux.org                            realss.com
unix sysadmin
Martin Bähr          working in china        http://societyserver.org/mbaehr/

Reply via email to