[Top][All Lists]

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

Cannot read virtual file

From: bh
Subject: Cannot read virtual file
Date: Tue, 18 Feb 2003 19:46:28 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Configuration Information:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
uname output: Linux fatboy 2.4.20 #3 Sun Feb 16 23:29:19 CST 2003 i686 unknown
Machine Type: i686-pc-linux-gnu

Bash Version: 2.05a
Patch Level: 0
Release Status: release


I was trying to be clever with a small Linux driver. The /proc entry
was formatted to look like shell variable assignments, so

. /proc/whatever

would set some variables. Well, bash does not try to read because stat()
returns a zero size. Well, OK, but nothing else seems to be bashful about
reading from a virtual file where stat() returns zero size, e.g., cat /proc/foo.

Is it a valid suggestion to try to read when sourcing, even though stat()
returned zero? There are probably many reasons why is is difficult and
not a good idea to 'fix' the procfs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]