From: Ryan W. M. <ry...@gu...> - 2001-04-23 12:47:23
|
Andres, Yes, this is a problem with your module. You're not catching all of the output. Take for example a command such as this: if (`rpm -q <package>`) { do_this(); } If this is run and the package is not installed, you'll get a message such as this spit to the first open console: package <package> is not installed The proper workaround is to use standard shell tricks to trap the output: if (`rpm -q <package> > /dev/null 2>&1`) { do_this(); } Hope this helps. The same goes for system()'s and the such; all you're really doing is spawning an external shell so the standard shell tricks apply. Cheers, Ryan +-- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --+ Ryan W. Maple Guardian Digital, Inc. "If you eliminate the redundancy, sleep is a four letter word." -CW +-- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --+ On Mon, 23 Apr 2001, Andreas Gruber wrote: > Hallo! > > I have detected a kind of unfriendly behaviour of the miniserv of > Webmin. It occurs quite often when I call external commands within my > webmin module. Whenever the Webmin module (or the external command) > prints some output not to the resulting webpage but to STDERR I suppose. > The output appears somewhere on the system. Usually it appears on the > console I previously started the webmin miniserv from. But sometimes, > and this can really be annoying on systems several people work on, these > outputs appear on just any other console. > > Is it possible to divert all these outputs to a defined point? > (/dev/null) |