Guest User

Untitled

a guest
Jan 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. diff --git a/src/node.js b/src/node.js
  2. index f42bff5..ff32446 100644
  3. --- a/src/node.js
  4. +++ b/src/node.js
  5. @@ -251,6 +251,9 @@
  6. stdout._type = "pipe";
  7. }
  8.  
  9. + // For supporting legacy API we put the FD here.
  10. + stdout.fd = fd;
  11. +
  12. return stdout;
  13. });
  14.  
  15. @@ -259,6 +262,8 @@
  16. stderr.readable = false;
  17. stderr.write = process.binding('stdio').writeError;
  18. stderr.end = stderr.destroy = stderr.destroySoon = function() { };
  19. + // For supporting legacy API we put the FD here.
  20. + stderr.fd = 2;
  21.  
  22. process.__defineGetter__('stdin', function() {
  23. if (stdin) return stdin;
  24. @@ -278,6 +283,9 @@
  25. stdin.readable = true;
  26. }
  27.  
  28. + // For supporting legacy API we put the FD here.
  29. + stdin.fd = fd;
  30. +
  31. return stdin;
  32. });
Add Comment
Please, Sign In to add comment