Remove converting to negative fd#3516
Conversation
Convert a fd to -(fd + 1) if its a Fixnum seems wrong. Negative fds's are mostly invalid.
|
Note: |
|
You should create a spec that shows the failure in Process.spawn. It should go somewhere near here: Then make your code change and verify the behavior is correct. I don't think this PR will be merged without a spec. |
|
Thx for reviewing accidentally forgot to commit it. |
|
Looks good to me. Let's leave it for a few days to see if @yorickpeterse or @brixen have comments before merging it. |
There was a problem hiding this comment.
I would use regular English for this instead, so if :err is [:child, :out], but that's a minor detail.
|
Regarding Travis, I can't seem to figure out why it's not building the 2.2 branch. Does running |
|
All the specs which were marked as failing (IO popen) and my Process.spawn spec pass. |
* 2.2: allow nil,true,false to be modified when frozen
|
👍 Thanks |
Opening a PR for it because I'm not entirely sure if it should be removed.
Removing it means following behaviour:
Another way to merge multiple file descriptors is [:child, fd]. [:child, fd] means the file descriptor in the child process. This is different from fd. For example, :err=>:out means redirecting child stderr to parent stdout. But :err=>[:child, :out] means redirecting child stderr to child stdout. They differ if stdout is redirected in the child process as follows.