Skip to content

Commit 0ae60cd

Browse files
committed
Add 'fork'
1 parent f3f91c7 commit 0ae60cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Node/ChildProcess.purs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Node.ChildProcess
1818
, onMessage
1919
, onError
2020
, spawn
21+
, fork
2122
, SpawnOptions()
2223
, defaultSpawnOptions
2324
, StdIOBehaviour(..)
@@ -171,6 +172,11 @@ foreign import spawnImpl :: forall opts eff. String -> Array String -> { | opts
171172
-- There's gotta be a better way.
172173
foreign import undefined :: forall a. a
173174

175+
-- | A special case of `spawn` for creating Node.js child processes. The first
176+
-- | argument is the module to be run, and the second is the argv (command line
177+
-- | arguments).
178+
foreign import fork :: forall eff. String -> Array String -> Eff (cp :: CHILD_PROCESS | eff) ChildProcess
179+
174180
defaultSpawnOptions :: SpawnOptions
175181
defaultSpawnOptions =
176182
{ cwd: Nothing

0 commit comments

Comments
 (0)