Alasdair G Kergon writes ("Re: Bug#432986: lvm utilities complain about fds 
>2"):
> Do you have any examples?

In sh, it is common to pass extra fds to subprocesses when doing fd
plumbing.  For example, a debconf-using postinst ends up reexeced with
an fd onto the debconf frontend.  In my application, I "park" stdout
so that I can use it for debugging output later if I care to.

In any situation like this:
   your_script -calls-> some_utility -calls-> rune_specified_by_your_script
it is often useful to pass an fd to the rune.  This involves running
some_utility with nonstandard fds, and expects that some_utility
doesn't mess with those fds and instead passes them unharmed onto the
sub-rune.

LVM doesn't (AFAIK) call user-specified programs in this way but
either `your_script' or rune above might use LVM utilities - or might
use other programs which use LVM utilities - and in general it is
not possible to know whether there are any such other fds.

> > If lvm needs to fork off a daemon or some such then fine, it ought to
> > close them, but it should do so silently.
>  
> The warning has originally added upstream to help prove that a bug
> originally reported against lvm2 was actually elsewhere.

I don't think debugging some particular other bug is a good reason for
printing warnings for perfectly reasonable situations.

> The messages can be suppressed at runtime by setting the environment
> variable LVM_SUPPRESS_FD_WARNINGS.

This should be made the default in Debian.  I don't mind if the
feature can be turned on again (although I would question whether lvm
would be the right place to do this - maybe a /bin/{ba,}sh wrapper
would be a better choice).

Ian.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to