mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 06:56:33 +00:00
repl: Address simple fixes (#15828)
Release Notes: - Added logging in debug mode of raw kernel output from REPL. - Fixed REPL kernels not being shut down completely on close of Editor
This commit is contained in:
parent
ab1fabef68
commit
f6a0fef5cf
2 changed files with 4 additions and 5 deletions
|
@ -225,6 +225,7 @@ impl RunningKernel {
|
|||
.current_dir(&working_directory)
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.stdin(std::process::Stdio::piped())
|
||||
.kill_on_drop(true)
|
||||
.spawn()
|
||||
.context("failed to start the kernel process")?;
|
||||
|
@ -329,8 +330,8 @@ impl RunningKernel {
|
|||
impl Drop for RunningKernel {
|
||||
fn drop(&mut self) {
|
||||
std::fs::remove_file(&self.connection_path).ok();
|
||||
|
||||
self.request_tx.close_channel();
|
||||
self.process.kill().ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,8 +220,6 @@ impl Session {
|
|||
match kernel {
|
||||
Ok((mut kernel, mut messages_rx)) => {
|
||||
this.update(&mut cx, |session, cx| {
|
||||
// At this point we can create a new kind of kernel that has the process and our long running background tasks
|
||||
|
||||
let stderr = kernel.process.stderr.take();
|
||||
|
||||
cx.spawn(|_session, mut _cx| async move {
|
||||
|
@ -236,7 +234,7 @@ impl Session {
|
|||
})
|
||||
.detach();
|
||||
|
||||
let stdout = kernel.process.stderr.take();
|
||||
let stdout = kernel.process.stdout.take();
|
||||
|
||||
cx.spawn(|_session, mut _cx| async move {
|
||||
if let None = stdout {
|
||||
|
@ -314,7 +312,7 @@ impl Session {
|
|||
}
|
||||
});
|
||||
|
||||
// todo!(kyle): send kernelinforequest once our shell channel read/writes are split
|
||||
// todo!(@rgbkrk): send kernelinforequest once our shell channel read/writes are split
|
||||
// cx.spawn(|this, mut cx| async move {
|
||||
// cx.background_executor()
|
||||
// .timer(Duration::from_millis(120))
|
||||
|
|
Loading…
Reference in a new issue