File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
io/native/src/main/scala/fs2/io/process Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ private[process] trait ProcessesCompanionPlatform {
9595 } else {
9696 findExecutable(process.command).getOrElse(process.command)
9797 }
98- val stdinPipe = stackalloc[CInt ](2 )
99- val stdoutPipe = stackalloc[CInt ](2 )
100- val stderrPipe = stackalloc[CInt ](2 )
98+ val stdinPipe = stackalloc[CInt ](2 .toUInt )
99+ val stdoutPipe = stackalloc[CInt ](2 .toUInt )
100+ val stderrPipe = stackalloc[CInt ](2 .toUInt )
101101
102102 if (pipe(stdinPipe) != 0 || pipe(stdoutPipe) != 0 || pipe(stderrPipe) != 0 ) {
103103 throw new RuntimeException (" Failed to create pipes" )
@@ -251,13 +251,12 @@ private[process] trait ProcessesCompanionPlatform {
251251
252252 private def fallbackExitValue (pid : pid_t): F [Int ] = {
253253 def loop : F [Int ] =
254- F .delay {
254+ F .blocking {
255255 Zone { _ =>
256256 val status = stackalloc[CInt ]()
257257 val result = waitpid(pid, status, WNOHANG )
258258
259259 if (result == pid) {
260- println(" bye bye process" )
261260 Some (WEXITSTATUS (! status))
262261 } else if (result == 0 ) None
263262 else throw new IOException (s " waitpid failed with errno: ${errno.errno}" )
You can’t perform that action at this time.
0 commit comments