Description of problem: Remote command ending with '&' do not fork out from rhn_check process. Command is running successfilly but it doesn't return the promt to parrent process. So, rhn_check still waiting the end of execution, like as '&' is absent. Steps to Reproduce: 1. create remote command ending with '&' (for running in background) 2. run rhn_check on client machine 3. Actual results: Summary: Run an arbitrary script scheduled by spaceadmin Details: This action will be executed after 03/22/13 9:41:00 AM MSK. This action's status is: Failed. The client picked up this action on 03/22/13 9:43:55 AM MSK. The client completed this action on 03/22/13 9:45:59 AM MSK. Client execution returned "Script killed, timeout of 120 seconds exceeded" (code 1) Run as: root:root Timeout: 120 seconds #!/bin/sh (tail -f /var/log/somelogfile > /tmp/dest_file) & Start Date: 2013-03-22 00:00:00 End Date: 2013-03-22 00:00:00 Return Code: 0 Raw Output: view/download raw script output Filtered Output: Expected results: rhn_check shouldn't wait the end of execution of remote command running in background (like as it happens with manual command execution in bash) Additional info: # rhn_check -vvv <...> D: do_call script.run(45, {'username': 'root', 'groupname': 'root', 'now': '2013-03-22 10:43:55', 'timeout': 120, 'script': '#!/bin/sh\n(tail -f /var/log/somelogfile > /tmp/dest_file) &'}){'cache_only': None} D: Sending back response(1, 'Script killed, timeout of 120 seconds exceeded', {'output': '', 'base64enc': 1, 'process_end': '2013-03-22 10:45:57', 'return_code': 0, 'process_start': '2013-03-22 10:43:55'}) D: do_call packages.checkNeedUpdate('rhnsd=1',){} <...>
This is supposed to work this way. When executing remote command, Spacewalk needs to know the result of the action -- this is so that it can actually display whether or not was the action successful. If you need to execute a remote command which would have to stay running on the machine, the remote process needs to be daemonized.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.