John Summerfied wrote: > > The nice thing about /proc and (apparently) /sys is that one can, at a > pinch, control many functions by simply reading with cat and writing > with echo. There are several things particular to my Toshiba laptop that > I can control in this way, and if I can do that then I can write a > script to automate something (eg choosing runlevel based on which of > three buttons is used to boot the computer). I recall previous > discussion on controlling DASD devices using similar entries (in /proc), > and one commonly sees advice to turn (network) forwarding on or off > using "echo >/proc/sys/net/ipv4/ip_forward 1" The cat&echo tactics is dangerous because it is racy: you echo your command into it. Becuase the file descriptor is closed between cat&echo, someone else may issue a different command or read your result before you cat the procfile. That cannot happen with the vmcp way to handle it, you'll always see _your_ response. --
Carsten Otte IBM Linux technology center ARCH=s390 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390