[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [linux-lvm] Writing forward compatible applications using /proc
- From: Steven Lembark <lembark wrkhors com>
- To: linux-lvm sistina com
- Subject: Re: [linux-lvm] Writing forward compatible applications using /proc
- Date: Sun, 12 Aug 2001 14:13:48 -0500
You should also be able to get all the information you need from the
tools.
Problem with this is (a) having for fork/exec the tool at each
iteration and (b) having to capture/parse stdout/stderr and
check exit/signal status for each call. Just the error checking
and validating stderr vs. stdout can double the code size for
getting data.
Another way out (which the /proc file system was intended to
avoid) is to put an add'l device file in the VG directory
(e.g., "./status") which delivers a struct or block text
with the same info as /proc has now. Net result is that a
simple read or fgets will pull in the necessary info w/o
all the extra error checking.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 800 762 1582
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]