Skip to content

Commit

Permalink
fix: add subprocess unref
Browse files Browse the repository at this point in the history
  • Loading branch information
akitaSummer committed Feb 1, 2024
1 parent 3d99ac3 commit 702d69c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/cli/lib/deamon.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ const addProject = async config => {


const runDeamon = async () => {
execa(destinationFilePath, [], {
const subprocess = execa(destinationFilePath, [], {
detached: true,
stdio: [ 'ignore', 'pipe', 'pipe' ],
stdio: 'ignore',
});

subprocess.unref();

let count = 0;

while (count < 10) {
Expand Down
2 changes: 1 addition & 1 deletion packages/deamon/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async fn main() {

{
let project_tree = project_tree.clone();
tokio::spawn(async move {
std::thread::spawn(move || {
tokio::runtime::Runtime::new()
.unwrap()
.block_on(start_server(project_tree, sender, socket_path));
Expand Down

0 comments on commit 702d69c

Please sign in to comment.