mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Clean up roc_dev_native
a bit
`writer` is only used by the parent process, so we don't need the soon-to-be-forked child process to create it just to immediately get overwritten by `execve`.
This commit is contained in:
parent
11c9b90551
commit
d0f8dbe85b
1 changed files with 1 additions and 3 deletions
|
@ -1205,14 +1205,11 @@ fn roc_dev_native(
|
|||
layout_interner,
|
||||
} = expect_metadata;
|
||||
|
||||
// let shm_name =
|
||||
let shm_name = format!("/roc_expect_buffer_{}", std::process::id());
|
||||
let mut memory = ExpectMemory::create_or_reuse_mmap(&shm_name);
|
||||
|
||||
let layout_interner = layout_interner.into_global();
|
||||
|
||||
let mut writer = std::io::stdout();
|
||||
|
||||
match unsafe { libc::fork() } {
|
||||
0 => unsafe {
|
||||
// we are the child
|
||||
|
@ -1253,6 +1250,7 @@ fn roc_dev_native(
|
|||
};
|
||||
}
|
||||
ChildProcessMsg::Expect => {
|
||||
let mut writer = std::io::stdout();
|
||||
roc_repl_expect::run::render_expects_in_memory(
|
||||
&mut writer,
|
||||
arena,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue