Bug 1383661 - Output not always logged
Summary: Output not always logged
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-11 11:43 UTC by jochen
Modified: 2019-07-12 11:21 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-12 11:21:42 UTC


Attachments (Terms of Use)

Description jochen 2016-10-11 11:43:50 UTC
Description of problem:

If the last read request returns an empty string, the command output is not getting logged.

Bug is around line 462 of rhnsd.c:


		ret = waitpid(child, &retval, WNOHANG);
		if (ret == child) {
		    /* huh, status changed, we're done */
		    if (strlen(buffer) > 0)
			syslog(LOG_INFO, "%s returned: %s", RHN_CHECK, buf);
		    free(buf);
                    close(fds[0]); /* plug in fd leak */


Instead of:

if (strlen(buffer) > 0)

this should be:

if (strlen(buf) > 0)

Comment 1 Michael Mráka 2019-07-12 11:21:42 UTC
In current version of Spacewalk 2.9 rhnsd has been replaced by systemd timer.


Note You need to log in before you can comment on or make changes to this bug.