Opened 11 years ago

Closed 11 years ago

#4630 closed patch (fixed)

Silence ping errors

Reported by: sphery <mtdean@…> Owned by: Janne Grunau
Priority: trivial Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The attached trivial patch, mythtv-silence_ping_error.patch , silences the error output from ping when the installed version expects the -t argument to be used to specify the packet type, rather than a timeout (i.e. for BSD-like ping commands, such as the one distributed by GNU inetutils). Without the patch, the error:

unsupported packet type: 3

is output to the mythbackend log. The patch simply redirects standard error to stdout (which had already been redirected to /dev/null).

The code already supports a "fallback" mode, in that if the exit status of the command is not 0, the ping is retried without the -t argument, so this is simply a cosmetic fix for logging to prevent users from worrying about the error. Though this fallback ping didn't report any errors on my system, I also redirected its stderr to stdout (which is also redirected to /dev/null), as the interpretation of the results of the pings is well enough reported by the code in mythcontext, so if errors do occur on some systems, users shouldn't see the ping errors themselves.

Attachments (1)

mythtv-silence_ping_error.patch (730 bytes) - added by sphery <mtdean@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by sphery <mtdean@…>

comment:1 Changed 11 years ago by Janne Grunau

Milestone: unknown0.21
Owner: changed from Isaac Richards to Janne Grunau
Status: newaccepted

comment:2 Changed 11 years ago by Janne Grunau

(In [15962]) Refs #4630. Redirect ping's stderr output.

From: sphery <mtdean[a]thirdcontact[p]com>

comment:3 Changed 11 years ago by Janne Grunau

Resolution: fixed
Status: acceptedclosed

(In [15964]) Fixes #4630. Redirect ping's stderr output.

From: sphery <mtdean[a]thirdcontact[p]com>

Note: See TracTickets for help on using tickets.