-
Notifications
You must be signed in to change notification settings - Fork 22
Command stdout being closed early #48
Description
I have a large binary (as opposed to a reduced test case) where the stdout descriptor is somehow being set to a Descriptor::Closed
value. Initial fd_write
calls are ok, but later fd_write
calls to stdout then fail, but the failure is also being swallowed resulting in an ok completion and no indication of the failure.
In this scenario, there is no fd_close
call, in fact the only other host call happening is monotonic clock calls. So I'm not sure exactly why the Descriptor::Closed
value is appearing. I can see that the stdout descriptor is running through the Descriptor
Drop
though which might be the culprit. Perhaps due to the overwriting approach being done for commands, I'm not sure.
I'm going to test out a non-command case tomorrow and will report back if this works around the issue, but wanted to post up the bug for now at least. The second bug that the fd_write
error is not being propagated also seems like an important one to fix, it would be more useful to always treat errors as errors of the command function itself I think.