BSD3 licensed
Maintained by

Module documentation for

This package contains libraries for dealing with system processes.

The typed-process package is a more recent take on a process API, which uses this package internally. It features better binary support, easier concurrency, and a more composable API. You can read more about it at


Changelog for process package July 2017

  • Expose CGid, GroupID, and UserID from System.Process.Internals #90 #91 February 2017

  • Fix: waitForProcess race condition #46 #58 February 2017

  • Bug fix: Don't close already closed pipes #81
  • Relax version bounds of Win32 to allow 2.5.
  • Add support for monitoring process tree for termination with the parameter use_process_jobs in CreateProcess on Windows. Also added a function terminateJob to kill entire process tree. December 2016

  • New exposed withCreateProcess
  • Derive Show and Eq for CreateProcess, CmdSpec, and StdStream January 2016

  • Added createPipeFD #52
    • New function createPipeFD added which returns a POSIX File Descriptor (CInt) instead of a GHC Handle to a pipe November 2015

  • Use less CPP #47
    • Refactor to have separate Windows and POSIX modules internally
    • Remove the broken non-GHC code paths November 2015

  • Added child_user and child_group to CreateProcess for unix. #45 August 2015

  • Add StdStream(NoStream) to have standard handles closed. #13
  • Support for Windows DETACHED_PROCESS and setsid #32
  • Support for Windows CREATE_NEW_CONSOLE #38 March 2015

  • [Meaningful error message when exe not found on close_fds is


  • New functions readCreateProcess and readCreateProcessWithExitCode Jan 2015

  • Fix delegated CTRL-C handling in createProcess in case of failed process creation. See issue #15 for more details.

  • waitpid on child PID after pre-exec failure in child to prevent zombies. See also issue #14. Dec 2014

  • Add support for base-

  • Remove Hugs98 specific code

  • New IsString CmdSpec instance

  • Expose documentation for System.Process.Internals

  • With GHC 7.10, System.Cmd and System.Process are now Safe (when compiled with older GHC versions they are just Trustworthy)

  • Expose createProcess_ function, and document behavior of UseHandle for createProcess. See issue #2.

  • New System.Process.createPipe operation. See also GHC #8943 Dec 2013

  • Update to Cabal 1.10 format
  • Remove NHC specific code
  • Add support for base-
  • Improve showCommandForUser to reduce redundant quoting
  • New functions callProcess, callCommand, spawnProcess and spawnCommand
  • Implement WCE handling according to
  • New delegate_ctlc field in CreateProcess for WCE handling
  • Use ExitFailure (-signum) on Unix when a proc is terminated due to a signal.
  • Deprecate module System.Cmd
  • On non-Windows, the child thread now comunicates any errors back to the parent thread via pipes.
  • Fix deadlocks in readProcess and readProcessWithExitCode
Used by 1049 packages:
Agda, AndroidViewHierarchyImporter, ArrowVHDL, BNFC, BlogLiterately, Cabal, Cabal-ide-backend, CabalSearch, Command, Commando, Conscript, DPM, DSH, DSTM, Dao, DisTract, DocTest, DrIFT, DrIFT-cabalized, Extra, ForSyDe, Fungi, GHood, GenI, Gifcurry, GiveYouAHead, Graphalyze, Grow, GuiHaskell, H, HAppS-Server, HAppS-Util, HFitUI, HJVM, HLearn-distributions, HNM, HSFFIG, HSH, HTF, HarmTrace, HasCacBDD, Hashell, Hayoo, Hclip, Hedi, HerbiePlugin, Hish, Hoed, Holumbus-Searchengine, Hs2lib, Hsmtlib, INblobs, JYU-Utils, KiCS, Lambdajudge, Lastik, LogicGrowsOnTrees-processes, MagicHaskeller, Mhailist, MissingH, MonadLab, Obsidian, OnRmt, OpenAFP, Parry, Phsu, Pipe, PlslTools, Pugs, Quelea, R-pandoc, RNAlien, ReviewBoard, Rlang-QQ, SBench, Saturnin, ScratchFs, SelectSequencesFromMSA, Semantique, ShellCheck, SoccerFun, SoccerFunGL, Strafunski-Sdf2Haskell, TBC, TaxonomyTools, TestExplode, UMM, Unixutils, ViennaRNAParser, Villefort, WashNGo, Webrexp, Yogurt, Yogurt-Standalone, a50, abcnotation, accelerate-cuda, acl2, activehs, addLicenseInfo, afv, ajhc, algebra-sql, amazonka-test, amby, ampersand, amqp-utils, android, angel, angle, apelsin, apiary, apply-refact, archive, archiver, archlinux-web, arion, arx, aspell-pipe, astview, atom, augur, authenticate-kerberos, autonix-deps, autoproc, avr-shake, aws-mfa-credentials, azubi, b9, backdropper, bake, bamboo, bamboo-launcher, bamboo-theme-mini-html5, bamse, batchd, bein, benchmark-function, berp, bindings-saga-cmd, bio, bird, black-jewel, blatex, blubber-server, bluetile, bond, brainfuck-monad, buchhaltung, buildbox, buildwrapper, bumper, burnt-explorer, bustle, c2hs, cab, cabal-db, cabal-debian, cabal-dev, cabal-ghci, cabal-graphdeps, cabal-helper, cabal-install, cabal-install-bundle, cabal-install-ghc72, cabal-install-ghc74, cabal-macosx, cabal-mon, cabal-nirvana, cabal-rpm, cabal-sign, cabal-sort, cabal-src, cabal-uninstall, cabal2arch, cabal2doap, cabal2nix, cabal2spec, cabalg, cabalgraph, cabin, caffegraph, cake, cake3, campfire, cao, capri, carettah, cartel, cblrepo, certificate, cg, cgrep, chalkboard, chalmers-lava2000, change-monger, chatty, citation-resolve, clafer, claferIG, claferwiki, clash-ghc, clash-lib, clckwrks, cless, clippard, cloben, clone-all, clr-inline, clr-win-linker, cmaes, cmdargs, cmdargs-browser, cmdtheline, cnc-spec-compiler, codecov-haskell, codemonitor, codex, command, command-qq, concorde, concraft-pl, concrete-haskell, concurrent-output, conduit-extra, configuration-tools, confsolve, copilot-c99, copilot-cbmc, copilot-theorem, court, cplusplus-th, cpuperf, cr, craft, creatur, criu-rpc, crunghc, cryptol, csound-expression, csv-table, current-locale, dao, darcs, darcs-benchmark, darcs-beta, darcs-buildpackage, darcs-cabalized, darcs-graph, darcs-monitor, darcsden, darcswatch, datapacker, dbjava, ddc-build, ddc-driver, ddc-tools, ddc-war, debian, debian-build, debug-diff, debug-me, dedukti, delta, depends, dephd, derive, desert, devil, diagrams-lib, diagrams-pgf, dib, diffcabal, diffdump, difftodo, dist-upload, distribution-nixpkgs, dmc, dmenu, dmenu-pkill, dmenu-pmount, dmenu-search, dockercook, doctest, doi, dotenv, dotfs, dropsolve, dsh-sql, duplo, dynamic-plot, dynobud, dyre, dzen-utils, easyplot, ec2-unikernel, echo, ecu, editor-open, editpipe, egison, ehaskell, ekg-rrd, elm-compiler, elm-get, elm-init, elm-package, elm-reactor, elm-repl, elm-server, email, embeddock, epic, epub-tools, ersaconcat, ersatz, execs, executor, exference, extra, fay, fcd, feed-gipeda, feldspar-compiler, fficxx, fibon, file-command-qq, filestore, fix-imports, flaccuraterip, fltkhs-demos, fmark, fordo, formal, forml, fpco-api, fquery, free-theorems-webui, fswatch, fswatcher, funcmp, fuzzytime, gdo, geek, geni-gui, getemx, gf, ghc, ghc-core, ghc-core-html, ghc-dump-tree, ghc-gc-tune, ghc-imported-from, ghc-make, ghc-man-completion, ghc-mod, ghc-options, ghc-parmake, ghc-pkg-autofix, ghci-haskeline, ghci-ng, ghcid, giak, ginsu, git-annex, git-checklist, git-embed, git-fmt, git-freq, git-jump, git-mediate, git-repair, git-sanity, git-vogue, gitHUD, gitcache, github-backup, gitit, gitrev, gitson, gli, glirc, gnuplot, goa, gpah, gps2htmlReport, graphviz, graql, grasp, grm, gtk-helpers, gtk2hs-buildtools, gtkrsync, hDFA, hScraper, hXmixer, hackage-diff, hackage-server, hackage-whatsnew, hackager, hackmanager, hackport, haddock-test, haddocset, hail, hake, hakyll, hakyll-R, hakyll-contrib-elm, halive, haltavista, hamusic, handa-gdata, hannahci, hapistrano, happstack-server, happstack-util, happybara-webkit, happybara-webkit-server, harmony, hask-home, haskdogs, haskeem, haskeline, haskell-awk, haskell-cnc, haskell-coffee, haskell-docs, haskell-gi, haskell-import-graph, haskell-platform-test, haskell-player, haskell-read-editor, haskell-tools-cli, haskell-tools-daemon, haskell-typescript, haskell-updater, haskell98, haskell98libraries, haskellscript, haskelzinc, haskintex, haskore, haskore-realtime, haskore-supercollider, haskus-system-build, hastache, haste-compiler, hat, hayland, hback, hbro, hbro-contrib, hcltest, hcron, hdevtools, hdf, hdm, hdo, hdocs, heckle, hein, heist, helisp, helium, hell, hellnet, hermit, herringbone, hesh, hgdbmi, hgettext, hgrev, hi, hi3status, hifi, himerge, hinstaller, hip, historian, hlatex, hledger, hledger-ui, hlint, hly, hmatrix-gsl, hmenu, hmk, hmp3, hmt-diagrams, holy-project, hoobuddy, hoodle-core, hoodle-extra, hoodle-publish, hoogle, hoogle-index, hooks-dir, hoovie, houseman, hp2any-core, hp2any-graph, hpage, hpaste, hpasteit, hpc-coveralls, hpc-tracer, hplaylist, hpodder, hpygments, hs-gizapp, hs-watchman, hsConfigure, hsay, hsbencher, hsc2hs, hsc3, hsc3-dot, hsc3-graphs, hsc3-plot, hsc3-process, hsc3-utils, hscope, hscrtmpl, hsdev, hsenv, hsfcsh, hslackbuilder, hslinks, hslogger, hsmagick, hspec-server, hspec-setup, hsprocess, hstorchat, hstox, htime, http-wget, hub, hubris, hunp, husk-scheme, hxt-filter, hydra-print, hydrogen-prelude, hylide, ide-backend, ide-backend-common, ide-backend-server, idringen, idris, ihaskell, ihs, imbib, imperative-edsl, infer-upstream, inject, inline-java, inline-r, intel-aes, internetmarke, intero, io-streams, ipatch, iptadmin, ipython-kernel, iridium, iterIO, ivory-backend-c, jammittools, jarify, jsaddle, json-autotype, json-tools, jsonextfilter, jukebox, jupyter, kansas-lava, kdesrc-build-extra, keera-posture, keiretsu, keter, keysafe, keystore, kit, lambdabot-haskell-plugins, lambdabot-misc-plugins, lambdabot-novelty-plugins, lambdabot-reference-plugins, lambdabot-utils, lambdacube-compiler, language-c, language-objc, language-puppet, latex-formulae-image, latex-function-tables, leksah-server, lhae, lhc, lhs2tex, lhslatex, libGenI, libgit, libgraph, libhbb, licensor, lilypond, linkcore, linode, linux-perf, linux-ptrace, liquid-fixpoint, liquidhaskell, live-sequencer, llvm, llvm-analysis, llvm-ht, llvm-pkg-config, llvm-pretty-bc-parser, lojban, loopy, lord, loshadka, lp-diagrams, lscabal, maccatcher, machines-process, macosx-make-standalone, maid, make-package, makedo, manatee-core, manatee-mplayer, marmalade-upload, marxup, mathblog, mathflow, mathgenealogy, matplotlib, matterhorn, mattermost-api, maude, maxsharing, maybench, mbox-tools, mcm, mdo, mediabus, mediabus-rtp, mediawiki2latex, memis, mida, midi-utils, mime-mail, minions, minirotate, module-management, modulo, mohws, mole, monitor, monky, mpvguihs, msu, mud, mudbath, mueval, multi-cabal, multifile, multifocal, multiplicity, muon, mushu, music-graphics, music-preludes, music-score, music-util, mute-unmute, mybitcoin-sci, mystem, n-m, native, neil, nemesis, netcore, netease-fm, newt, nix-eval, nix-paths, notmuch-web, nptools, nvim-hs, on-demand-ssh-tunnel, open-browser, open-pandoc, opensoundcontrol-ht, opn, optparse-applicative, orc, orchid, osdkeys, oso2pdf, package-o-tron, packdeps, packunused, pager, panda, pandoc, pandoc-citeproc, pandoc-citeproc-preamble, pandoc-filter-graphviz, pandoc-include-code, pandoc-plantuml-diagrams, pandoc-vimhl, pango, panpipe, passage, pb, pdf-toolbox-viewer, pdf2line, pdfsplit, pdynload, pec, pesca, pgdl, phoityne, phoityne-vscode, phybin, pia-forward, pid1, pipes-cliff, pipes-shell, pit, pitchtrack, plist-buddy, plot-gtk, plot-gtk3, ploton, plots, plugins, plugins-multistage, pointless-haskell, pointless-lenses, pointless-rewrite, pomodoro, ports-tools, posix-pty, postgresql-orm, prefork, preprocessor, proc, process-conduit, process-extras, process-iterio, process-listlike, process-progress, process-qq, process-streaming, proctest, progression, progressive, propellor, proto-lens-protoc, prove-everywhere-server, pugs-compat, purescript, puzzle-draw, qr-imager, qtah-cpp-qt5, qtah-generator, quickbench, quickcheck-script, quicktest, quipper, quipper-rendering, quoridor-hs, rail-compiler-editor, rainbow, rapid-term, rascal, read-editor, readline, recursive-line-count, redo, refurb, reload, repline, reserve, resolve-trivial-conflicts, rest-gen, retryer, reversi, rewrite, ridley, riot, rl-satton, robin, roguestar, roshask, rpm, rts-loader, ruby-qq, runghc, runmany, salvia, samtools, sandman, sarsi, satchmo, satchmo-backends, satchmo-examples, satchmo-minisat, sbv, scc, scenegraph, scholdoc, scholdoc-citeproc, scion-browser, scons2dot, scp-streams, scrz, scyther-proof, secure-sockets, selenium-server, sensei, sensenet, sensu-run, sentry, seqaid, serf, servant-ekg, servant-quickcheck, shadower, shake, shake-cabal-build, shake-language-c, shakespeare, shakespeare-babel, shell-conduit, shellish, shellmate, shelltestrunner, shelly, shivers-cfg, shqq, shuffle, sifflet, sifflet-lib, simple, simple-smt, simpleprelude, simplex, sindre, skeleton, sloth, smerdyakov, smtlib2-pipe, smtp2mta, snap-elm, snap-testing, snaplet-ghcjs, snaplet-sass, snipcheck, source-code-server, sourcemap, sox, sparkle, spike, spiros, sprinkles, spy, sr-extra, srcinst, sscan, ssh, sshtun, stack, stack-bump, stack-hpc-coveralls, stack-run-auto, stack2nix, stackage-cabal, stackage-cli, stackage-curator, stackage-install, stackage-query, stackage-sandbox, stackage-setup, stackage-update, stackage-upload, static-resources, steeloverseer, stm-promise, streaming-commons, strictify, styx, sugarhaskell, sunlight, sunroof-examples, super-user-spark, supercollider-ht, supero, sync-mht, synthesizer, synthesizer-core, sys-auth-smbclient, sys-process, system-command, system-extra, system-info, system-locale, system-test, table, tabloid, taffybar, tamarin-prover, tamarin-prover-term, tamarin-prover-theory, target, task-distribution, tasty-golden, tasty-program, tasty-silver, tasty-stats, tdd-util, tempered, tempo, termplot, tersmu, test-framework-golden, test-framework-program, test-sandbox, test-sandbox-compose, testbench, texrunner, text-show-instances, textmatetags, threadPool, tianbar, timeconsole, timestamp-subprocess-lines, tmp-postgres, todos, touched, toysolver, tpar, transf, transient-universe, travis-pogodi, trawl, traypoweroff, tsparse, tttool, turtle, typalyze, typed-process, typeof, uacpid, uhc-light, uhc-util, una, unbreak, uni-posixutil, unix-process-conduit, unm-hip, unused, up-grade, update-nix-fetchgit, update-repos, urembed, urxml, uuagc-cabal, uuagd, uzbl-with-source, vacuum-cairo, vacuum-opengl, vado, vampire, vault-tool-server, vcs-revision, vcsgui, vcswrapper, vgrep, vimeta, vimus, vintage-basic, virthualenv, visual-graphrewrite, visual-prof, vivid, vk-posix-pty, voyeur, wacom-daemon, wai-app-file-cgi, wai-devel, wai-handler-launch, wai-middleware-consul, watchit, wavconvert, webserver, weeder, weigh, werewolf-slack, whim, win-hp-path, wlc-hs, wolf, wordsetdiff, wxdirect, wyvern, x509-system, xchat-plugin, xilinx-lava, xkbcommon, xml-to-json-fast, xmobar, xmonad, xmonad-bluetilebranch, xmonad-contrib, xmonad-contrib-bluetilebranch, xmonad-entryhelper, xmonad-eval, xmonad-extras, xmonad-vanessa, xsact, yavie, yeganesh, yesod-bin, yesod-content-pdf, yesod-fast-devel, yesod-fay, yesod-gitrepo, yesod-static, yi-core, yices, yjftp, yjftp-libs, youtube, zeno, zeroth, zifter, zifter-cabal, zifter-git, zifter-google-java-format, zifter-hindent, zifter-stack, zipedit, zre, ztail
comments powered byDisqus