packages/process.git
2 years agoRevert "Fix bug in multi-threaded waitForProcess"
Charles Cooper [Fri, 3 Feb 2017 15:09:20 +0000 (10:09 -0500)] 
Revert "Fix bug in multi-threaded waitForProcess"

This reverts commit d67484fe64a9a42e7daf944a9396b4ec46c060f3.

2 years agoFix bug in multi-threaded waitForProcess
Charles Cooper [Sat, 2 Apr 2016 21:42:56 +0000 (17:42 -0400)] 
Fix bug in multi-threaded waitForProcess

Previously an exception was being thrown when multiple threads were
blocking on waitForProcess due to inconsistent handling of the return
code of `waitpid`:

"If more than one thread is suspended in waitpid() awaiting termination
of the same process, exactly one thread returns the process status at
the time of the target child process termination. The other threads
return -1, with errno set to ECHILD."

`getProcessExitCode` was handling the ECHILD case by returning 1, but
`waitForProcess` was returning (-1) in all cases. For consistency this
commit follows the approach in getProcessExitCode, returning 1 to the
caller of c_waitForProcess if errno is ECHILD, thus avoiding throwing
an exception in the calling code.

2 years agoMerge pull request #88 from jamescheney/patch-1
Michael Snoyman [Mon, 30 Jan 2017 14:49:09 +0000 (16:49 +0200)] 
Merge pull request #88 from jamescheney/patch-1

Update Common.hs

2 years agoUpdate Common.hs
James Cheney [Mon, 30 Jan 2017 14:38:58 +0000 (14:38 +0000)] 
Update Common.hs

#87

2 years agoMerge pull request #80 from Mistuke/gh-77-create-process-hook
Michael Snoyman [Mon, 30 Jan 2017 12:29:49 +0000 (14:29 +0200)] 
Merge pull request #80 from Mistuke/gh-77-create-process-hook

Add new API that can correctly wait for termination of processes forked with exec on Windows.

2 years agofix build.
Tamar Christina [Sun, 29 Jan 2017 21:48:24 +0000 (21:48 +0000)] 
fix build.

2 years agorebased and set back WINDOWS_CCONV
Tamar Christina [Sun, 29 Jan 2017 21:06:58 +0000 (21:06 +0000)] 
rebased and set back WINDOWS_CCONV

2 years agoUpdated based on review
Tamar Christina [Sun, 29 Jan 2017 20:52:53 +0000 (20:52 +0000)] 
Updated based on review

2 years agoGH77: Added note.'
Tamar Christina [Tue, 17 Jan 2017 19:02:39 +0000 (19:02 +0000)] 
GH77: Added note.'

2 years agoGH77: fixed bug.
Tamar Christina [Mon, 16 Jan 2017 02:39:13 +0000 (02:39 +0000)] 
GH77: fixed bug.

2 years agoGH77: Add appropriate ifdefs.
Tamar Christina [Sun, 8 Jan 2017 11:29:18 +0000 (11:29 +0000)] 
GH77: Add appropriate ifdefs.

2 years agoGH77: replace <$> with fmap
Tamar Christina [Sun, 8 Jan 2017 09:52:35 +0000 (09:52 +0000)] 
GH77: replace <$> with fmap

2 years agoGH77: fix pattern matching posix.
Tamar Christina [Sun, 8 Jan 2017 09:51:18 +0000 (09:51 +0000)] 
GH77: fix pattern matching posix.

2 years agoGH77: remove typo.
Tamar Christina [Sun, 8 Jan 2017 06:36:04 +0000 (06:36 +0000)] 
GH77: remove typo.

2 years agoGH77: fix Posix.
Tamar Christina [Sun, 8 Jan 2017 00:34:19 +0000 (00:34 +0000)] 
GH77: fix Posix.

2 years agoGH77: rebased.
Tamar Christina [Sat, 7 Jan 2017 15:01:00 +0000 (15:01 +0000)] 
GH77: rebased.

2 years agoGH77: restored compatibility.
Tamar Christina [Sat, 7 Jan 2017 11:51:44 +0000 (11:51 +0000)] 
GH77: restored compatibility.

2 years agoGH77: Update readme.
Tamar Christina [Thu, 5 Jan 2017 19:53:40 +0000 (19:53 +0000)] 
GH77: Update readme.

2 years agoGH77: fix compile errors.
Tamar Christina [Mon, 2 Jan 2017 20:30:50 +0000 (20:30 +0000)] 
GH77: fix compile errors.

2 years agoGH77: rewrote implementation.
Tamar Christina [Mon, 2 Jan 2017 15:54:07 +0000 (15:54 +0000)] 
GH77: rewrote implementation.

2 years agoGH77: Accept output.
Tamar Christina [Sun, 11 Dec 2016 15:23:19 +0000 (15:23 +0000)] 
GH77: Accept output.

2 years agoGH77: fix tests
Tamar Christina [Sun, 11 Dec 2016 12:01:03 +0000 (12:01 +0000)] 
GH77: fix tests

2 years agoGH77: update tests.
Tamar Christina [Sun, 11 Dec 2016 00:07:08 +0000 (00:07 +0000)] 
GH77: update tests.

2 years agoGH77: Update testsuite.
Tamar Christina [Sat, 10 Dec 2016 21:56:58 +0000 (21:56 +0000)] 
GH77: Update testsuite.

2 years agoGH77: Finish implementation.
Tamar Christina [Sat, 10 Dec 2016 21:35:31 +0000 (21:35 +0000)] 
GH77: Finish implementation.

2 years agoGH77: Working
Tamar Christina [Sat, 10 Dec 2016 20:34:30 +0000 (20:34 +0000)] 
GH77: Working

2 years agoGH77: Add failing test for Windows.
Tamar Christina [Sun, 4 Dec 2016 20:03:27 +0000 (20:03 +0000)] 
GH77: Add failing test for Windows.

2 years agoGH77: Fix tests
Tamar Christina [Sun, 4 Dec 2016 18:45:26 +0000 (18:45 +0000)] 
GH77: Fix tests

2 years agoGH77: Updated readme
Tamar Christina [Sun, 4 Dec 2016 17:21:40 +0000 (17:21 +0000)] 
GH77: Updated readme

2 years agoGH77: Replaced system and rawSystem
Tamar Christina [Sun, 4 Dec 2016 17:20:45 +0000 (17:20 +0000)] 
GH77: Replaced system and rawSystem

2 years agoGH77: Update readme and export list.
Tamar Christina [Sun, 4 Dec 2016 16:25:07 +0000 (16:25 +0000)] 
GH77: Update readme and export list.

2 years agoGH77: Add terminate job
Tamar Christina [Sun, 4 Dec 2016 10:44:19 +0000 (10:44 +0000)] 
GH77: Add terminate job

2 years agoGH77: Fixed compilation
Tamar Christina [Sun, 4 Dec 2016 08:15:39 +0000 (08:15 +0000)] 
GH77: Fixed compilation

2 years agoGH77: Add scaffolding.
Tamar Christina [Sat, 3 Dec 2016 10:12:08 +0000 (10:12 +0000)] 
GH77: Add scaffolding.

2 years agoMerge pull request #86 from ndmitchell/master
Michael Snoyman [Sun, 22 Jan 2017 15:50:06 +0000 (17:50 +0200)] 
Merge pull request #86 from ndmitchell/master

Clarify Binary properties of the streams

2 years ago#82, note that all created handles are in text mode.
Neil Mitchell [Sun, 22 Jan 2017 15:39:57 +0000 (15:39 +0000)] 
#82, note that all created handles are in text mode.

2 years ago#82, remove the incorrect notes that Handle's are in binary mode.
Neil Mitchell [Sun, 22 Jan 2017 15:39:25 +0000 (15:39 +0000)] 
#82, remove the incorrect notes that Handle's are in binary mode.

2 years agoMerge pull request #85 from Mistuke/bump-win32
Michael Snoyman [Sun, 22 Jan 2017 08:33:27 +0000 (10:33 +0200)] 
Merge pull request #85 from Mistuke/bump-win32

Relax Win32 version bounds.

2 years agoRelax version bounds.
Tamar Christina [Fri, 20 Jan 2017 19:54:12 +0000 (19:54 +0000)] 
Relax version bounds.

2 years agoUpdate changelog for #81
Michael Snoyman [Tue, 13 Dec 2016 12:17:40 +0000 (14:17 +0200)] 
Update changelog for #81

2 years agoMerge pull request #81 from bgamari/master
Michael Snoyman [Tue, 13 Dec 2016 12:15:56 +0000 (14:15 +0200)] 
Merge pull request #81 from bgamari/master

Don't close already closed pipes

2 years agorunProcess.c: Don't close already closed pipes
Ben Gamari [Mon, 12 Dec 2016 19:45:40 +0000 (14:45 -0500)] 
runProcess.c: Don't close already closed pipes

a9a8e914e114913f5eea07da607b29c137bf2041 added some `close` calls which
attempted to close pipes that we already closed previously. This resulted in the
error code we read from the failed child being overwritten, resulting in
the `process004` test failing.

2 years agorunProcess.c: Clean up whitespace
Ben Gamari [Mon, 12 Dec 2016 19:45:08 +0000 (14:45 -0500)] 
runProcess.c: Clean up whitespace

2 years agoVersion bump for release #79
Michael Snoyman [Fri, 9 Dec 2016 11:53:55 +0000 (13:53 +0200)] 
Version bump for release #79

2 years agoMerge pull request #78 from haskell/bgamari-patch-1
Michael Snoyman [Tue, 6 Dec 2016 23:40:15 +0000 (18:40 -0500)] 
Merge pull request #78 from haskell/bgamari-patch-1

Bump directory upper bound to < 1.4

2 years agoBump directory upper bound to < 1.4
Ben Gamari [Tue, 6 Dec 2016 22:20:43 +0000 (17:20 -0500)] 
Bump directory upper bound to < 1.4

2 years agoMerge pull request #75 from bgamari/master
Michael Snoyman [Wed, 16 Nov 2016 03:23:05 +0000 (05:23 +0200)] 
Merge pull request #75 from bgamari/master

Bump upper bound on base

2 years agoBump upper bound on base
Ben Gamari [Tue, 15 Nov 2016 17:53:37 +0000 (12:53 -0500)] 
Bump upper bound on base

2 years agoSlightly more robust tests
Michael Snoyman [Sun, 13 Nov 2016 12:17:25 +0000 (14:17 +0200)] 
Slightly more robust tests

Signed-off-by: Michael Snoyman <michael@snoyman.com>
2 years agoComment out lts-2
Michael Snoyman [Sun, 13 Nov 2016 11:57:13 +0000 (13:57 +0200)] 
Comment out lts-2

2 years agoDerive Show and Eq for CGid as well
Michael Snoyman [Sun, 13 Nov 2016 10:13:39 +0000 (12:13 +0200)] 
Derive Show and Eq for CGid as well

2 years agoUpdate changelog
Michael Snoyman [Sun, 13 Nov 2016 10:09:40 +0000 (12:09 +0200)] 
Update changelog

2 years agoMerge branch 'master' of https://github.com/elaforge/process into 74-check-rel-path...
Michael Snoyman [Sun, 13 Nov 2016 10:07:58 +0000 (12:07 +0200)] 
Merge branch 'master' of https://github.com/elaforge/process into 74-check-rel-path-subdirs

2 years agoMerge branch 'better-travis2' into 74-check-rel-path-subdirs
Michael Snoyman [Sun, 13 Nov 2016 10:02:21 +0000 (12:02 +0200)] 
Merge branch 'better-travis2' into 74-check-rel-path-subdirs

2 years agoMerge branch 'master' of https://github.com/ezyang/process into 74-check-rel-path...
Michael Snoyman [Sun, 13 Nov 2016 10:01:39 +0000 (12:01 +0200)] 
Merge branch 'master' of https://github.com/ezyang/process into 74-check-rel-path-subdirs

2 years agoUse isInfixOf (for Windows)
Michael Snoyman [Sun, 13 Nov 2016 09:55:47 +0000 (11:55 +0200)] 
Use isInfixOf (for Windows)

2 years agoMerge branch 'master' into 74-check-rel-path-subdirs
Michael Snoyman [Sun, 13 Nov 2016 09:50:14 +0000 (11:50 +0200)] 
Merge branch 'master' into 74-check-rel-path-subdirs

2 years agoBetter Travis: more GHCs, Stack, and OS X better-travis2
Michael Snoyman [Sun, 13 Nov 2016 09:46:23 +0000 (11:46 +0200)] 
Better Travis: more GHCs, Stack, and OS X

2 years agoFix warnings
Michael Snoyman [Sun, 13 Nov 2016 09:41:32 +0000 (11:41 +0200)] 
Fix warnings

2 years agoBump resolver
Michael Snoyman [Sun, 13 Nov 2016 09:40:25 +0000 (11:40 +0200)] 
Bump resolver

2 years agoInclude -y to pacman
Michael Snoyman [Sun, 13 Nov 2016 09:40:19 +0000 (11:40 +0200)] 
Include -y to pacman

2 years agoTest relative paths in subdirectories
Michael Snoyman [Sun, 13 Nov 2016 09:38:04 +0000 (11:38 +0200)] 
Test relative paths in subdirectories

2 years agoAdd a remark on how relative cmdspec is resolved w.r.t. to cwd.
Edward Z. Yang [Fri, 11 Nov 2016 14:34:12 +0000 (09:34 -0500)] 
Add a remark on how relative cmdspec is resolved w.r.t. to cwd.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2 years agoMerge pull request #73 from erikd/master
Michael Snoyman [Sun, 23 Oct 2016 04:34:03 +0000 (07:34 +0300)] 
Merge pull request #73 from erikd/master

Fix CPP usage

2 years agoFix CPP usage
Erik de Castro Lopo [Sun, 23 Oct 2016 01:55:32 +0000 (12:55 +1100)] 
Fix CPP usage

The code `#if WINDOWS` works but is not really correct. GHC HEAD now
has a `-Wcpp-undef` warning that we would like to turn on and hence
need this fixed.

2 years agoMerge pull request #69 from JonCoens/withCreateProcess
Michael Snoyman [Thu, 11 Aug 2016 16:40:12 +0000 (19:40 +0300)] 
Merge pull request #69 from JonCoens/withCreateProcess

Expose withCreateProcess to users.

2 years agoExpose withCreateProcess to users.
Jon Coens [Thu, 11 Aug 2016 14:04:32 +0000 (15:04 +0100)] 
Expose withCreateProcess to users.

The function was commented out and not used anywhere. I changed it to run cleanup on more than just exceptional cases.

3 years agoMerge pull request #67 from haskell/binary-handles
Michael Snoyman [Tue, 14 Jun 2016 15:00:03 +0000 (18:00 +0300)] 
Merge pull request #67 from haskell/binary-handles

Add check for binary handles

3 years agoAdd check for binary handles
Michael Snoyman [Tue, 14 Jun 2016 13:37:39 +0000 (16:37 +0300)] 
Add check for binary handles

3 years agoMerge pull request #65 from Yuras/pipe_leak
Michael Snoyman [Tue, 14 Jun 2016 11:55:23 +0000 (14:55 +0300)] 
Merge pull request #65 from Yuras/pipe_leak

Close pipes on failure

3 years agoClose pipes on failure
Yuras Shumovich [Thu, 26 May 2016 10:46:21 +0000 (13:46 +0300)] 
Close pipes on failure

Make sure stdin, stdout and stderr pipes are closed when exec call
fails, e.g. when the executable doesn't exist.

3 years agoMerge pull request #62 from robjhen/master
Michael Snoyman [Thu, 12 May 2016 15:13:41 +0000 (18:13 +0300)] 
Merge pull request #62 from robjhen/master

Removed .hsc extension no longer in use

3 years agoRemoved .hsc extension no longer in use (Process.hs)
Robert Henderson [Thu, 12 May 2016 08:59:59 +0000 (09:59 +0100)] 
Removed .hsc extension no longer in use (Process.hs)

3 years agoAdd Show and Eq instances to CreateProcess, CmdSpce, and StdStream.
Evan Laforge [Sat, 19 Mar 2016 03:26:33 +0000 (20:26 -0700)] 
Add Show and Eq instances to CreateProcess, CmdSpce, and StdStream.

3 years agoMerge pull request #52 from Mistuke/trac-11100-expose-part-of-create-pipe v1.4.2.0
Michael Snoyman [Tue, 26 Jan 2016 11:03:26 +0000 (13:03 +0200)] 
Merge pull request #52 from Mistuke/trac-11100-expose-part-of-create-pipe

Trac 11100 expose part of create pipe

3 years agoT11100: renamed functions
Tamar Christina [Tue, 26 Jan 2016 07:28:57 +0000 (08:28 +0100)] 
T11100: renamed functions

3 years agoT11100: Updated version and changelog
Tamar Christina [Mon, 25 Jan 2016 07:21:33 +0000 (08:21 +0100)] 
T11100: Updated version and changelog

3 years agoT11100: Use the correct Fd type for POSIX.
Tamar Christina [Sun, 24 Jan 2016 18:54:39 +0000 (19:54 +0100)] 
T11100: Use the correct Fd type for POSIX.

3 years agoT11100: Expose createPipeInternalFd on POSIX systems as well
Tamar Christina [Sun, 24 Jan 2016 17:32:58 +0000 (18:32 +0100)] 
T11100: Expose createPipeInternalFd on POSIX systems as well

3 years agoSwitch to Travis caching with Stack and OS X support
Michael Snoyman [Sun, 24 Jan 2016 13:13:29 +0000 (15:13 +0200)] 
Switch to Travis caching with Stack and OS X support

3 years agoT11100: Updated the createPipe implementation
Tamar Christina [Sat, 23 Jan 2016 13:09:16 +0000 (14:09 +0100)] 
T11100: Updated the createPipe implementation

3 years agoT11100: modified pipe functions. Need some cleanup
Tamar Christina [Wed, 20 Jan 2016 05:47:35 +0000 (06:47 +0100)] 
T11100: modified pipe functions. Need some cleanup

3 years agoRemove obsolete `--with-cc` flag from configure.ac
Herbert Valerio Riedel [Mon, 14 Dec 2015 06:40:56 +0000 (07:40 +0100)] 
Remove obsolete `--with-cc` flag from configure.ac

This non-standard flag was used previously by GHC's build-system to set the `CC` variable.

See https://phabricator.haskell.org/D1608 for more details

3 years agoVersion bump v1.4.1.0
Michael Snoyman [Tue, 17 Nov 2015 13:34:47 +0000 (15:34 +0200)] 
Version bump

3 years agoMerge pull request #47 from haskell/less-cpp
Michael Snoyman [Tue, 17 Nov 2015 03:28:35 +0000 (05:28 +0200)] 
Merge pull request #47 from haskell/less-cpp

Use less CPP

3 years agoAdd appveyor badge less-cpp
Michael Snoyman [Tue, 3 Nov 2015 16:56:24 +0000 (16:56 +0000)] 
Add appveyor badge

3 years agoappveyor: install perl
Michael Snoyman [Mon, 2 Nov 2015 23:52:51 +0000 (23:52 +0000)] 
appveyor: install perl

3 years agoAnother shot at appveyor
Michael Snoyman [Mon, 2 Nov 2015 23:27:35 +0000 (23:27 +0000)] 
Another shot at appveyor

3 years agoRemove (broken) support for non-GHC compilers
Michael Snoyman [Mon, 2 Nov 2015 21:20:40 +0000 (21:20 +0000)] 
Remove (broken) support for non-GHC compilers

3 years agoecho y
Michael Snoyman [Mon, 2 Nov 2015 21:11:35 +0000 (21:11 +0000)] 
echo y

3 years agoFix Windows build again
Michael Snoyman [Mon, 2 Nov 2015 19:29:10 +0000 (11:29 -0800)] 
Fix Windows build again

3 years agoEven less CPP in System.Process
Michael Snoyman [Mon, 2 Nov 2015 17:13:56 +0000 (17:13 +0000)] 
Even less CPP in System.Process

3 years agoPass -y to pacman
Michael Snoyman [Mon, 2 Nov 2015 17:13:33 +0000 (17:13 +0000)] 
Pass -y to pacman

3 years agoMove interruptProcessGroupOf into per-OS modules
Michael Snoyman [Mon, 2 Nov 2015 17:02:44 +0000 (17:02 +0000)] 
Move interruptProcessGroupOf into per-OS modules

3 years agoMove createPipe to per-OS modules
Michael Snoyman [Mon, 2 Nov 2015 16:57:45 +0000 (16:57 +0000)] 
Move createPipe to per-OS modules

3 years agoappveyor: I'll get this right eventually
Michael Snoyman [Mon, 2 Nov 2015 16:54:00 +0000 (16:54 +0000)] 
appveyor: I'll get this right eventually

3 years agoIgnore Vim .swp files
Michael Snoyman [Mon, 2 Nov 2015 16:43:21 +0000 (16:43 +0000)] 
Ignore Vim .swp files

3 years agoFix some GHC 7.2 warnings
Michael Snoyman [Mon, 2 Nov 2015 16:40:17 +0000 (16:40 +0000)] 
Fix some GHC 7.2 warnings

3 years agoappveyor: s/bash/sh
Michael Snoyman [Mon, 2 Nov 2015 16:36:02 +0000 (16:36 +0000)] 
appveyor: s/bash/sh

3 years agoAdd some clarifying comments
Michael Snoyman [Mon, 2 Nov 2015 16:35:09 +0000 (16:35 +0000)] 
Add some clarifying comments