[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mtab and /proc/meminfo
From: |
Victor Hugo Erminpour |
Subject: |
mtab and /proc/meminfo |
Date: |
Tue, 20 Oct 2009 19:57:02 -0700 (PDT) |
Hello all,
I'm running strace against 2.05b.0(1)-release and I can
see that bash is opening /etc/mtab and /proc/meminfo,
but I can't find any reference to this in the code.
Also, this appears when I run bash as "/bin/sh -c <command>".
Here's the strace output:
{{{
...
open("/etc/mtab", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=22472, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb73e2000
read(3, "/dev/cciss/c0d0p2 / ext3 rw 0 0\n"..., 4096) = 4096
close(3) = 0
munmap(0xb73e2000, 4096) = 0
open("/proc/meminfo", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb73e2000
read(3, " total: used: free:"..., 4096) = 781
close(3) = 0
munmap(0xb73e2000, 4096)
...
}}}
The code seems to be in shell.c, but again no specific
references to mtab or /proc/meminfo. Any ideas?
Thanks,
--Victor
- mtab and /proc/meminfo,
Victor Hugo Erminpour <=