mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
Merge pull request #609 from nushell/jonathandturner-patch-2
Attempt to fix issue with ^C in Windows
This commit is contained in:
commit
ffaf17945d
@ -342,7 +342,19 @@ impl ExternalCommand {
|
|||||||
|
|
||||||
match stream_next {
|
match stream_next {
|
||||||
StreamNext::Last => {
|
StreamNext::Last => {
|
||||||
popen.wait()?;
|
let _ = popen.detach();
|
||||||
|
loop {
|
||||||
|
match popen.poll() {
|
||||||
|
None => {
|
||||||
|
let _ = std::thread::sleep(std::time::Duration::new(0, 100000000));
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
let _ = popen.terminate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("");
|
||||||
Ok(ClassifiedInputStream::new())
|
Ok(ClassifiedInputStream::new())
|
||||||
}
|
}
|
||||||
StreamNext::External => {
|
StreamNext::External => {
|
||||||
|
Loading…
Reference in New Issue
Block a user