Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Sep 30, 2022
1 parent aafc65d commit 75a535a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/iostream.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,6 @@ UInt SyExecuteProcess(Char * dir, Char * prg, Int in, Int out, Char * args[])
}
}

FreezeStdin = 1;

// spawn subprocess
pid_t pid;
if (posix_spawn_with_dir(&pid, prg, &file_actions, 0, args, environ,
Expand All @@ -617,9 +615,16 @@ UInt SyExecuteProcess(Char * dir, Char * prg, Int in, Int out, Char * args[])
return -1;

Check warning on line 615 in src/iostream.c

View check run for this annotation

Codecov / codecov/patch

src/iostream.c#L614-L615

Added lines #L614 - L615 were not covered by tests
}

// stop trying to read input
FreezeStdin = 1;

// wait for some action
int status;
pid_t wait_pid = waitpid(pid, &status, 0);

// TODO: align this code to the other implementation...

// resume reading input, resume child handler
FreezeStdin = 0;

// cleanup
Expand Down

0 comments on commit 75a535a

Please sign in to comment.