[1.5.x] Fixed #19749 -- Documented ending param to command's self.stdout/err

Thanks xian at mintchaos.com for the report.
Backport of 0201b9d6d from master