Debugging plugins: hack the command line with a ' 2>&1' to see the yelps.

Stanley Hopcroft Stanley.Hopcroft=C7xMDYEmw/metl107C8+VBNDptHseIHJ at public.gmane.org
Wed May 14 02:03:59 CEST 2003


Dear Ladies and gentlemen

These are the times that try mens souls ..

After seeing quite a lot of noise about 'No output!' from plugins 
(frequently Perl plugins), perhaps it may help to patch checks.c and 
utils.c so that the command line passed to popen() has the string ' 
2>&1' appended to it, possibly under control of a compile time constant 
(#ifdef DEBUG6).

This may give the viewer any complaints/messages/bitches from the plugin
or from the plugin runtime (Perl, Java, TCL, Python, Ruby) when the
language processor can't find util.pm or something else goes wrong ...

I am posting this to nag plugin-dev also since the change could either
 
. be done there (in spopen()) instead

. a new coding guideline be added to recommend that plugin writers trap 
stderr (by dup'ing stdout, dup2(), *STDERR = *STDOUT etc etc)

Your comments are welcome. 

Yours sincerely.


-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
Nagiosplug-devel mailing list
Nagiosplug-devel=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Developers mailing list