Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3108

Add optional argument to execresult() enabling selection of output to capture (stderr, stdout, both)

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.17.0
    • Component/s: None
    • Labels:
    • Story Points:
      8
    • Complexity:
      S

      Description

      CFE-3103 notes undesirable behavior related to the output captured by execresult(). It would be nice to be able to select the specific type of output to capture, leaving the default (capturing both) as it is today.

      Perhaps something like this:

      Example execresult() with optional argument to express output to capture
      bundle agent execresult_output_argument
      {
        vars:
            "stderr" string => execresult( "/myprogram", "noshell", "stderr" );
            "stdout" string => execresult( "/myprogram", "noshell", "stdout" );
            "stderr_and_stdout1" string => execresult( "/myprogram", "noshell" );
            "stderr_and_stdout2" string => execresult( "/myprogram", "noshell", "both" );
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olehermanse Ole Herman Schumacher Elgesem
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel