popenhs is a popen-like library for Haskell. http://www.haskell.org/~petersen/haskell/popenhs/
|Latest on Hackage:||1.0.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
convenient way of sending string input to a subprocess and
reading output lazily. The code is based on runProcess from
the hslibs posix library. (It is also an example of how to
use automake in haskell packages.)
It provides two functions popen and popenEnvDir.
* popen gives lazy output and error streams from a
subprocess command, and optionally can direct input from a
string to the process.
* popenEnvDir in addition lets specify environment and
directory in which to run the subprocess command.
Building should be straightforward. See the generic INSTALL
file and "./configure --help" for more details.
* run "./configure"
* then "make"
* and "make install"
For applications using popenhs, a helper program
"popenhs-config" is provided that can be used in Makefile's
for example to get the correct compile and link options.
"popenhs-config --help" gives more information.
* popenhs.spec.in: Tidied up. Use rpm macros.
* index.html: Update for new release.
* README: Update for 1.00.0.
* NEWS: Add entries for 1.00.0 and 0.00.1.
* Makefile.am (bin_SCRIPTS): Use PACKAGE.
(pkglibdir): Use automake vars.
(EXTRA_DIST): Add spec file.
(rpm, web): New rules from hsclock. Use automake vars.
* POpen.hs: Export popen and popenEnvDir now.
Import hPutStr, hClose, fromJust, isJust and when.
(popen): New wrapper function replacing popen2 and popen3 wrapper.
Maybe takes additional arg for input string and no longer returns
(popenEnvDir): New function replacing popenOutErr and
popenInOutErr. Maybe takes additional arg for input string and no
longer returns input handle. When there is input, create input
pipe, write input string to it and close the pipe input handle.
After forking, close pipe output fd in original process if there
was input. This fixes the problem reported by Uwe <> that popen3
was hanging on input from a pipe with closed input.
(doTheBusiness): Maybe takes input fd, and no longer returns input
handle. dupTo instead of mayDup2, since we always redirect. Only
dup2 input when given input. Replace code after execFile to keep
type-system happy with a error instead.
(maybeDup2): Removed, since no longer needed.
* configure.in: Up version to 1.00.0
2001-10-05 Jens Petersen <firstname.lastname@example.org>
* popen.spec.in: new file, based on gtk+hs.spec.in
* configure.in: use autoconf
* Makefile.in: from Makefile
* Makefile.am: use automake
* acinclude.m4: was aclocal.m4