kurtlawrence / papyrus

(Rust) repl
MIT License
440 stars 14 forks source link

Linux stderr and stdout not printing #15

Closed kurtlawrence closed 5 years ago

kurtlawrence commented 5 years ago

papyrus=> println!("stdout") on linux build, does not direct output

kurtlawrence commented 5 years ago

It works for the pad on linux, i have narrowed it down to the fact that using a DefaultTerminal will also be gagged even on another thread.

This does not seem to happen on windows, maybe because when gagged it is thread orientated.

kurtlawrence commented 5 years ago

The fix was to flag if redirection was needed, and when using DefaultTerminal flag as false.

e409ced7e7c70d3cf4fa5b4709ad2e775091f4c7