! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
genmon does not display error output from commands
Status:
RESOLVED: FIXED
Product:
Xfce4-genmon-plugin
Component:
General

Comments

Description Steve 2008-04-29 18:58:17 CEST
Configure genmon to run a command with invalid arguments, such as "date -q".
"XXX" is displayed in the panel instead of the error message.

In a terminal window:
$ date -q
date: invalid option -- q
Try `date --help' for more information.

xfce4-genmon-plugin 3.2 - Generic Monitor
Comment 1 Steve 2008-04-29 20:26:57 CEST
Created attachment 1610 
genmon_SpawnCmd() returns 0 if there is data from stdout or stderr

This patch changes genmon_SpawnCmd() to return 0 when there is data from either stdout or stderr, otherwise -1. If there is data from both, only data from stdout is put into the buffer.

Test by configuring genmon with a period of one second, and each of these commands:
1. "date" should show the current date and time.
2. "date -q" should show an error message.
3. "/bin/true" should show "XXX".

This patch also includes changes from http://bugzilla.xfce.org/show_bug.cgi?id=4036
so that this patch can be tested with "/bin/true".
Comment 2 Florian Rivoal editbugs 2011-02-24 15:19:43 CET
Patch applied. Thanks.

Bug #4049

Reported by:
Steve
Reported on: 2008-04-29
Last modified on: 2011-02-24

People

Assignee:
Florian Rivoal
CC List:
0 users

Version

Version:
3.2 or older

Attachments

Additional information