Skip to content

Commit d725e31

Browse files
committed
converted 2 to UInt
1 parent b253b4b commit d725e31

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

io/native/src/main/scala/fs2/io/process/ProcessesPlatform.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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}")

0 commit comments

Comments
 (0)