Revert "Adding missing call to close() and initializing returncode in pipe (#2034)" (#2038)
Revert "Adding missing call to close() and initializing returncode in pipe (#2034)" (#2038)

This reverts commit bf8df36abffe3ffb6ede9748bd215debb89ecd0c.

Co-authored-by: narrieta <narrieta>
Azure/WALinuxAgent,Azure/WALinuxAgent