System.Process.ByteString.readProcess, readProcessWithExitCode

Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.

David Fox
writes:
Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.
I agree. I wrote my own version of readProcessWithExitCode a while back as well. John

On Thu, Aug 9, 2012 at 9:28 AM, David Fox
Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.
Sorry, didn't know attachments were excluded. The two functions are available in the Unixutils library: http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-U...

On 9 August 2012 20:33, David Fox
On Thu, Aug 9, 2012 at 9:28 AM, David Fox
wrote: Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.
Sorry, didn't know attachments were excluded. The two functions are available in the Unixutils library: http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-U...
Some time ago I fixed some asynchronous exception bugs in those functions. Take a look at the current implementation: https://github.com/ghc/packages-process/blob/master/System/Process.hs#L392 You might want to incorporate these changes into your library. Cheers, Bas

On Fri, Aug 10, 2012 at 12:01 AM, Bas van Dijk
On 9 August 2012 20:33, David Fox
wrote: On Thu, Aug 9, 2012 at 9:28 AM, David Fox
wrote: Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a
lot
and would love to see them incorporated into a standard library, though I'm not sure which one.
Sorry, didn't know attachments were excluded. The two functions are available in the Unixutils library:
http://hackage.haskell.org/packages/archive/Unixutils/1.50/doc/html/System-U...
Some time ago I fixed some asynchronous exception bugs in those functions. Take a look at the current implementation:
https://github.com/ghc/packages-process/blob/master/System/Process.hs#L392
You might want to incorporate these changes into your library.
It looks like this will have to wait for bytestring 0.10, which has NFData instances. I guess there are ways to hack this...

David Fox
Attached is a module containing ByteString analogs of two functions from System.Process: readProcess and readProcessWithExitCode. I use these a lot and would love to see them incorporated into a standard library, though I'm not sure which one.
I have the process-extras library on Hackage which contains readProcessWithExitCode variants for ByteString and Text. http://hackage.haskell.org/package/process-extras I'd be happy to apply patches which add readProcess and make other improvements :-). Cheers, David

On 12 August 2012 22:53, David Lazar
I'd be happy to apply patches which add readProcess and make other improvements :-).
I made a pull request that fixes some asynchronous exception bugs and adds the System.Process.Text.Lazy module: https://github.com/davidlazar/process-extras/pull/1 Cheers, Bas

On Thu, Aug 16, 2012 at 11:36 AM, Bas van Dijk
On 12 August 2012 22:53, David Lazar
wrote: I'd be happy to apply patches which add readProcess and make other improvements :-).
I made a pull request that fixes some asynchronous exception bugs and adds the System.Process.Text.Lazy module:
Awesome. I've merged the pull request. I'll release a new version shortly. Cheers, David

On Thu, Aug 16, 2012 at 9:36 AM, Bas van Dijk
On 12 August 2012 22:53, David Lazar
wrote: I'd be happy to apply patches which add readProcess and make other improvements :-).
I made a pull request that fixes some asynchronous exception bugs and adds the System.Process.Text.Lazy module:
Does this depend on bytestring >= 0.10?

On Thu, Aug 16, 2012 at 7:31 PM, David Fox
Does this depend on bytestring >= 0.10?
No. I just released a new version of process-extras with Bas van Dijk's improvements: http://hackage.haskell.org/package/process-extras-0.2.0 Cheers, David
participants (4)
-
Bas van Dijk
-
David Fox
-
David Lazar
-
John Wiegley