Skip to content

Commit 45f2ebf

Browse files
committed
fixed F.raiseError
1 parent db7696e commit 45f2ebf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,20 @@ private[process] trait ProcessesCompanionPlatform {
8888
val stderrPipe = stackalloc[CInt](2)
8989

9090
if (pipe(stdinPipe) != 0 || pipe(stdoutPipe) != 0 || pipe(stderrPipe) != 0) {
91-
F.raiseError(new RuntimeException("Failed to create stdin pipe"))
91+
throw new RuntimeException("Failed to create pipes")
9292
}
9393

9494
val fileActions = stackalloc[posix_spawn_file_actions_t]()
9595
posix_spawn_file_actions_init(fileActions)
9696

9797
posix_spawn_file_actions_adddup2(fileActions, stdinPipe(0), STDIN_FILENO)
9898
posix_spawn_file_actions_addclose(fileActions, stdinPipe(1))
99-
posix_spawn_file_actions_addclose(fileActions, stdinPipe(0))
10099

101100
posix_spawn_file_actions_adddup2(fileActions, stdoutPipe(1), STDOUT_FILENO)
102101
posix_spawn_file_actions_addclose(fileActions, stdoutPipe(0))
103-
posix_spawn_file_actions_addclose(fileActions, stdoutPipe(1))
104102

105103
posix_spawn_file_actions_adddup2(fileActions, stderrPipe(1), STDERR_FILENO)
106104
posix_spawn_file_actions_addclose(fileActions, stderrPipe(0))
107-
posix_spawn_file_actions_addclose(fileActions, stderrPipe(1))
108105

109106
val pid = stackalloc[pid_t]()
110107
val result = posix_spawnp(

0 commit comments

Comments
 (0)