packages/unix.git
6 years agoUse pthread_kill on OS X too
Ian Lynagh [Thu, 17 Jan 2013 19:21:24 +0000 (19:21 +0000)] 
Use pthread_kill on OS X too

Fixes signals004(threaded1,threaded2) on OS X 32.

6 years agoFix some parentheses
Ian Lynagh [Thu, 17 Jan 2013 19:14:13 +0000 (19:14 +0000)] 
Fix some parentheses

I assume that this is what was intended.

6 years agoexecvpe exists on QNX
Stephen Paul Weber [Wed, 12 Dec 2012 00:26:55 +0000 (19:26 -0500)] 
execvpe exists on QNX

6 years agoFix putenv; trac #7342
Ian Lynagh [Sat, 1 Dec 2012 22:31:48 +0000 (22:31 +0000)] 
Fix putenv; trac #7342

We were freeing the string, but the string becomes part of the
environment.

6 years agoBump base lower version to 4.5 (the version GHC 7.4.1 came with)
Ian Lynagh [Fri, 30 Nov 2012 22:45:55 +0000 (22:45 +0000)] 
Bump base lower version to 4.5 (the version GHC 7.4.1 came with)

and remove code to support older versions

6 years agoUpdate dependencies
Ian Lynagh [Fri, 30 Nov 2012 17:56:17 +0000 (17:56 +0000)] 
Update dependencies

6 years agoBump version number following new policy
Ian Lynagh [Fri, 30 Nov 2012 16:40:58 +0000 (16:40 +0000)] 
Bump version number following new policy

We now keep the HEAD version numbers as values which would be suitable
for immediate release.

6 years agoAdd comment to .cabal file saying what GHC 7.6.1 shipped with
Ian Lynagh [Fri, 30 Nov 2012 16:00:21 +0000 (16:00 +0000)] 
Add comment to .cabal file saying what GHC 7.6.1 shipped with

6 years agoExport CatchInfo,CatchInfoOnce constructors of Handler
Ian Lynagh [Wed, 31 Oct 2012 15:12:28 +0000 (15:12 +0000)] 
Export CatchInfo,CatchInfoOnce constructors of Handler

This fixes warnings following
    commit 910a642294eb3547d0cbb3d5735ad81b964f137b
    Author: Simon Peyton Jones <simonpj@microsoft.com>
    Date:   Mon Oct 29 23:25:25 2012 +0000
    Do not treat a constructor in a *pattern* as a *use* of that constructor

I'm not sure if this is the right thing to do: In
    commit 1c4608e3b8737dbb9204f850af4d680ccea7d8ec
    Author: Simon Marlow <marlowsd@gmail.com>
    Date:   Thu Feb 19 10:05:32 2009 +0000
    Rewrite of signal-handling.
the commit message says:
    The new implementation has the capability to define signal handlers
    that have access to the siginfo of the signal (#592), but this
    functionality is not exposed in this patch.
but this at least gets validate builds working again, and we can change
it if necessary as part of #2451

6 years agoOnly use unsetenv if HAVE_UNSETENV is defined (fixes #7343)
Simon Hengel [Wed, 17 Oct 2012 22:40:19 +0000 (00:40 +0200)] 
Only use unsetenv if HAVE_UNSETENV is defined (fixes #7343)

6 years agoFix warnings.
Paolo Capriotti [Thu, 6 Sep 2012 10:30:40 +0000 (11:30 +0100)] 
Fix warnings.

6 years agoAdd functions for setting file times with high resolution
Marios Titas [Sun, 12 Aug 2012 19:46:22 +0000 (15:46 -0400)] 
Add functions for setting file times with high resolution

7 years agoBump version to 2.6.0.0 ghc-7.6.1-release unix-2.6.0.0-release
Paolo Capriotti [Tue, 10 Jul 2012 14:44:35 +0000 (15:44 +0100)] 
Bump version to 2.6.0.0

7 years agoFix warnings.
Paolo Capriotti [Wed, 18 Jul 2012 10:51:26 +0000 (11:51 +0100)] 
Fix warnings.

7 years agoExtract high resolution timestamps from FileStatus
Marios Titas [Wed, 13 Jun 2012 06:52:03 +0000 (02:52 -0400)] 
Extract high resolution timestamps from FileStatus

Signed-off-by: Paolo Capriotti <p.capriotti@gmail.com>
7 years agoAdd a WARNING for sleep, and expand documentation.
Paolo Capriotti [Mon, 2 Jul 2012 10:52:39 +0000 (11:52 +0100)] 
Add a WARNING for sleep, and expand documentation.

sleep doesn't really work on GHC because it is always immediately
interrupted by SIGVTALRM used in the RTS.

I explained the problem in a comment and added a WARNING pragma.

usleep and nanosleep have a similar problem, but, since they have better
precision, they can be restarted, so they are not as unusable as sleep.

7 years agoFollow changes in base
Ian Lynagh [Tue, 19 Jun 2012 21:53:55 +0000 (22:53 +0100)] 
Follow changes in base

7 years agouse Control.Monad.void instead of Foreign.void (which is now deprecated)
Simon Marlow [Wed, 25 Apr 2012 09:41:38 +0000 (10:41 +0100)] 
use Control.Monad.void instead of Foreign.void (which is now deprecated)

7 years agoAdd workaround for systems without clearenv.
Paolo Capriotti [Wed, 4 Apr 2012 14:33:53 +0000 (15:33 +0100)] 
Add workaround for systems without clearenv.

7 years agoRe-enable posix005 test (#5648)
Paolo Capriotti [Fri, 30 Mar 2012 18:23:29 +0000 (19:23 +0100)] 
Re-enable posix005 test (#5648)

7 years agoAdd setEnvironment and cleanEnv to System.Posix.Env (#5648)
Paolo Capriotti [Fri, 30 Mar 2012 18:16:39 +0000 (19:16 +0100)] 
Add setEnvironment and cleanEnv to System.Posix.Env (#5648)

7 years agofix documentation for getAnyProcessStatus/getGroupProcessStatus (#5946)
Simon Marlow [Fri, 23 Mar 2012 15:10:17 +0000 (15:10 +0000)] 
fix documentation for getAnyProcessStatus/getGroupProcessStatus (#5946)

7 years agoRemove tabs from System.Posix.Env.hsc.
Paolo Capriotti [Fri, 9 Mar 2012 14:20:01 +0000 (14:20 +0000)] 
Remove tabs from System.Posix.Env.hsc.

7 years agoCopy tests from GHC testsuite (#1161)
Paolo Capriotti [Fri, 9 Mar 2012 11:44:41 +0000 (11:44 +0000)] 
Copy tests from GHC testsuite (#1161)

7 years agoMove nocldstop from HsBase.h to HsUnix.h
Ian Lynagh [Sun, 26 Feb 2012 17:07:32 +0000 (17:07 +0000)] 
Move nocldstop from HsBase.h to HsUnix.h

7 years agoUpdate dependencies
Ian Lynagh [Wed, 22 Feb 2012 19:11:04 +0000 (19:11 +0000)] 
Update dependencies

7 years agoConvert some FFI decls to use capi
Ian Lynagh [Wed, 22 Feb 2012 01:47:27 +0000 (01:47 +0000)] 
Convert some FFI decls to use capi

7 years agoRelax base dependency
Ian Lynagh [Fri, 10 Feb 2012 18:47:55 +0000 (18:47 +0000)] 
Relax base dependency

7 years agoUse error not ioError for consistency.
David Terei [Tue, 10 Jan 2012 01:37:14 +0000 (17:37 -0800)] 
Use error not ioError for consistency.

7 years agoCode cleaning for recent changes
David Terei [Mon, 9 Jan 2012 23:19:34 +0000 (15:19 -0800)] 
Code cleaning for recent changes

7 years agoSystem.Posix.Temp compliance
Deian Stefan [Fri, 6 Jan 2012 07:28:51 +0000 (23:28 -0800)] 
System.Posix.Temp compliance

7 years agomkstemps
Deian Stefan [Fri, 6 Jan 2012 03:38:13 +0000 (19:38 -0800)] 
mkstemps

7 years agoFix validation error
David Terei [Fri, 6 Jan 2012 03:02:27 +0000 (19:02 -0800)] 
Fix validation error

7 years agoCode clean and documentation improvements to Temp.
David Terei [Fri, 6 Jan 2012 02:50:00 +0000 (18:50 -0800)] 
Code clean and documentation improvements to Temp.

7 years agoforgot to add to previous commit
Deian Stefan [Mon, 2 Jan 2012 05:54:52 +0000 (21:54 -0800)] 
forgot to add to previous commit

7 years agofix bugs and added mkdtemp
Deian Stefan [Mon, 2 Jan 2012 05:46:26 +0000 (21:46 -0800)] 
fix bugs and added mkdtemp

7 years agoDon't expose System.Posix.DynamicLinker.Common
Ian Lynagh [Thu, 15 Dec 2011 14:47:03 +0000 (14:47 +0000)] 
Don't expose System.Posix.DynamicLinker.Common

The other .Common modules aren't expose, and we think exposing this
one was a mistake.

7 years agoforkProcess now works with +RTS -N; update docs and tests
Simon Marlow [Tue, 6 Dec 2011 15:20:28 +0000 (15:20 +0000)] 
forkProcess now works with +RTS -N; update docs and tests

7 years agoRoll back the sigset capi changes
Ian Lynagh [Sat, 3 Dec 2011 16:43:18 +0000 (16:43 +0000)] 
Roll back the sigset capi changes

They broken the build on OSX. See #2979.

7 years agoUse capi to define the fcntl FFI imports
Ian Lynagh [Mon, 28 Nov 2011 18:59:18 +0000 (18:59 +0000)] 
Use capi to define the fcntl FFI imports

7 years agoUse capi some more (part of #5480)
Ian Lynagh [Mon, 28 Nov 2011 18:20:04 +0000 (18:20 +0000)] 
Use capi some more (part of #5480)

7 years agoConvert come FFI bindings to use the capi calling convention
Ian Lynagh [Sat, 26 Nov 2011 16:16:51 +0000 (16:16 +0000)] 
Convert come FFI bindings to use the capi calling convention

7 years agoFix Solaris breakage (I hope)
Simon Marlow [Mon, 28 Nov 2011 09:35:36 +0000 (09:35 +0000)] 
Fix Solaris breakage (I hope)

7 years agoFixes for NetBSD
Ian Lynagh [Fri, 25 Nov 2011 01:17:02 +0000 (01:17 +0000)] 
Fixes for NetBSD

Based on a patch from Arnaud Degroote <degroote@NetBSD.org> in
trac #5480.

7 years agoMove openPseudoTerminal into System.Posix.Terminal{.ByteString}
Simon Marlow [Wed, 23 Nov 2011 09:35:29 +0000 (09:35 +0000)] 
Move openPseudoTerminal into System.Posix.Terminal{.ByteString}

It may depend on getSlaveTerminalName if !defined(HAVE_OPENPTY)

7 years agoBump version 2.5.0.0 -> 2.5.1.0 (added RawFilePath API)
Simon Marlow [Thu, 17 Nov 2011 13:25:23 +0000 (13:25 +0000)] 
Bump version 2.5.0.0 -> 2.5.1.0 (added RawFilePath API)

7 years agoProvide a raw ByteString version of FilePath and environment APIs
Simon Marlow [Fri, 11 Nov 2011 16:18:48 +0000 (16:18 +0000)] 
Provide a raw ByteString version of FilePath and environment APIs

The new module System.Posix.ByteString provides exactly the same API
as System.Posix, except that:

  - There is a new type: RawFilePath = ByteString

  - All functions mentioning FilePath in the System.Posix API
    use RawFilePath in the System.Posix.ByteString API

  - RawFilePaths are not subject to Unicode locale encoding and
    decoding, unlike FilePaths.  They are the exact bytes passed to and
    returned from the underlying POSIX API.

  - Similarly for functions that deal in environment
    strings (System.Posix.Env): these use untranslated ByteStrings
    in System.Posix.Environment

  - There is a new function

     System.Posix.ByteString.getArgs :: [ByteString]

    returning the raw untranslated arguments as passed to exec() when
    the program was started.

7 years agoexecuteFile001: omit profiling ways
Simon Marlow [Mon, 21 Nov 2011 14:37:15 +0000 (14:37 +0000)] 
executeFile001: omit profiling ways

The RTS doesn't get a chance to produce the profile output after
executeFile, so tests that check for correct profiling output will fail.

7 years agoAdd a test for #5319
Ian Lynagh [Wed, 16 Nov 2011 18:21:32 +0000 (18:21 +0000)] 
Add a test for #5319

7 years agoFollow change to FFI decls: Import constructors of newtypes
Ian Lynagh [Thu, 20 Oct 2011 23:52:38 +0000 (00:52 +0100)] 
Follow change to FFI decls: Import constructors of newtypes

7 years agoFollow the removal of the Eq superclass of Num
Ian Lynagh [Thu, 15 Sep 2011 21:03:51 +0000 (22:03 +0100)] 
Follow the removal of the Eq superclass of Num

8 years agoRemove old darcs boring file
David Terei [Wed, 10 Aug 2011 19:35:13 +0000 (12:35 -0700)] 
Remove old darcs boring file

8 years agoFix conditional pragma to work with 6.12
David Terei [Tue, 9 Aug 2011 17:50:03 +0000 (10:50 -0700)] 
Fix conditional pragma to work with 6.12

8 years agoUse Safe Haskell when GHC >= 7.2
David Terei [Thu, 4 Aug 2011 00:06:28 +0000 (17:06 -0700)] 
Use Safe Haskell when GHC >= 7.2

8 years agoRemove some antiquated C constructs
Ian Lynagh [Mon, 1 Aug 2011 00:08:55 +0000 (01:08 +0100)] 
Remove some antiquated C constructs

Fixes validate on amd64/Linux with:

SRC_CC_OPTS += -Wmissing-parameter-type
SRC_CC_OPTS += -Wold-style-declaration
SRC_CC_OPTS += -Wold-style-definition

8 years agoRelax base dep ghc-7.2 ghc-7.2.1-release ghc-7.2.2-release
Ian Lynagh [Thu, 7 Jul 2011 22:07:19 +0000 (23:07 +0100)] 
Relax base dep

8 years agoBump version number
Ian Lynagh [Wed, 6 Jul 2011 17:13:30 +0000 (18:13 +0100)] 
Bump version number

8 years agoprefer bsd/libutil.h (if available) to libutil.h
Ross Paterson [Wed, 29 Jun 2011 17:58:04 +0000 (18:58 +0100)] 
prefer bsd/libutil.h (if available) to libutil.h

libutil.h is deprecated in recent releases of libbsd

8 years agoFix typos in future process group API
Favonia [Tue, 24 May 2011 22:47:35 +0000 (18:47 -0400)] 
Fix typos in future process group API

8 years agoelaborate the deprecation messages, and add commented-out new
Simon Marlow [Mon, 23 May 2011 10:30:40 +0000 (11:30 +0100)] 
elaborate the deprecation messages, and add commented-out new
versions, for setProcessGroupID and createProcessGroup

8 years agoadd processGroup001/processGroup002
Simon Marlow [Mon, 23 May 2011 10:13:13 +0000 (11:13 +0100)] 
add processGroup001/processGroup002

8 years agoTest cases for the new process group API.
Favonia [Thu, 12 May 2011 02:35:53 +0000 (22:35 -0400)] 
Test cases for the new process group API.

8 years agoChange the POSIX process group API. (trac #5167)
Favonia [Wed, 4 May 2011 10:52:44 +0000 (06:52 -0400)] 
Change the POSIX process group API. (trac #5167)

Make it possible to query the process group of an existing
process (through 'getProcessGroupIDOf') and try to make
function names more consistent. Here is the full list of
API changes in System.Posix.Process in this patch:

getProcessGroupID     => same
getProcessGroupIDOf   => new
createProcessGroup    => deprecated
createProcessGroupFor => new
joinProcessGroup      => same
setProcessGroupID     => deprecated
setProcessGroupIDOf   => new

8 years agoImproved Unicode support in the light of PEP383
Max Bolingbroke [Sat, 14 May 2011 21:45:27 +0000 (22:45 +0100)] 
Improved Unicode support in the light of PEP383

8 years agoallow some syscalls in System.Posix.Directory to return EINTR (#5184)
Simon Marlow [Tue, 10 May 2011 10:16:55 +0000 (11:16 +0100)] 
allow some syscalls in System.Posix.Directory to return EINTR (#5184)

8 years agoUpdate source repo location to be the git repo in .cabal file
Ian Lynagh [Fri, 8 Apr 2011 10:23:09 +0000 (11:23 +0100)] 
Update source repo location to be the git repo in .cabal file

8 years agoUse _NSGetEnviron on OS X: fixes #2458
Max Bolingbroke [Wed, 6 Apr 2011 06:57:21 +0000 (07:57 +0100)] 
Use _NSGetEnviron on OS X: fixes #2458

8 years agoAdd initial .gitignore
Max Bolingbroke [Tue, 5 Apr 2011 07:54:28 +0000 (08:54 +0100)] 
Add initial .gitignore

8 years agoInclude HsUnix.h earlier in System/Posix/Files.hsc ghc-darcs-git-switchover
Ian Lynagh [Thu, 24 Mar 2011 00:10:29 +0000 (00:10 +0000)] 
Include HsUnix.h earlier in System/Posix/Files.hsc

8 years agoAdd NondecreasingIndentation to the list of extensions
Ian Lynagh [Mon, 17 Jan 2011 19:24:30 +0000 (19:24 +0000)] 
Add NondecreasingIndentation to the list of extensions

8 years agoProper autoconf test for sem_close's library; fixes trac #4523
Ian Lynagh [Sat, 1 Jan 2011 20:11:50 +0000 (20:11 +0000)] 
Proper autoconf test for sem_close's library; fixes trac #4523

8 years agorun forkprocess01 with +RTS -ls too, to test #4512
Simon Marlow [Fri, 10 Dec 2010 09:46:45 +0000 (09:46 +0000)] 
run forkprocess01 with +RTS -ls too, to test #4512

8 years agoClarify behavior of "awaitSignal Nothing", export SignalSet that includes all signals...
Dmitry Astapov [Wed, 8 Dec 2010 18:38:49 +0000 (18:38 +0000)] 
Clarify behavior of "awaitSignal Nothing", export SignalSet that includes all signals reserved by RTS (#4504)

8 years agoRemove unnecessary fromIntegral calls
simonpj@microsoft.com [Tue, 16 Nov 2010 17:25:36 +0000 (17:25 +0000)] 
Remove unnecessary fromIntegral calls

8 years agoBump version to 2.4.1.0
Ian Lynagh [Fri, 17 Sep 2010 15:01:14 +0000 (15:01 +0000)] 
Bump version to 2.4.1.0

8 years agoavoid Foreign.unsafePerformIO
Ross Paterson [Thu, 9 Sep 2010 12:54:59 +0000 (12:54 +0000)] 
avoid Foreign.unsafePerformIO

9 years agoAdd bindings for setting effective user-id and group-id
Eric Mertens [Mon, 17 May 2010 18:19:45 +0000 (18:19 +0000)] 
Add bindings for setting effective user-id and group-id

Having the ability to set the effective user-id and group-id
enables the application to switch between the real user-id
and set-user-id multiple times.

9 years agoAllow base-4.3
Simon Marlow [Wed, 2 Jun 2010 08:25:09 +0000 (08:25 +0000)] 
Allow base-4.3

9 years agoadd a comment about 3816 failing due to Samba
Simon Marlow [Tue, 18 May 2010 08:44:22 +0000 (08:44 +0000)] 
add a comment about 3816 failing due to Samba

9 years agoProvide a dummy input file for queryfdoption01
Matthias Kilian [Sun, 18 Apr 2010 17:26:19 +0000 (17:26 +0000)] 
Provide a dummy input file for queryfdoption01

9 years agomention that forkProcess is not supported with +RTS -Nn where n > 1
Simon Marlow [Fri, 30 Apr 2010 08:28:41 +0000 (08:28 +0000)] 
mention that forkProcess is not supported with +RTS -Nn where n > 1

9 years agomake getAllGroupEntries work when called again; fixes #3816
Simon Marlow [Mon, 29 Mar 2010 11:27:13 +0000 (11:27 +0000)] 
make getAllGroupEntries work when called again; fixes #3816

9 years agoadd test for #3816
Simon Marlow [Mon, 29 Mar 2010 11:26:46 +0000 (11:26 +0000)] 
add test for #3816

9 years agofix warnings
Simon Marlow [Mon, 22 Mar 2010 13:16:15 +0000 (13:16 +0000)] 
fix warnings

9 years agohandleToFd: close both sides of a DuplexHandle (#3914)
Simon Marlow [Fri, 19 Mar 2010 21:08:02 +0000 (21:08 +0000)] 
handleToFd: close both sides of a DuplexHandle (#3914)

9 years agocheck for EINTR in openFd
Simon Marlow [Wed, 27 Jan 2010 11:46:00 +0000 (11:46 +0000)] 
check for EINTR in openFd

9 years agoaccept --with-cc to set the path to gcc (#2966)
Simon Marlow [Wed, 27 Jan 2010 11:43:29 +0000 (11:43 +0000)] 
accept --with-cc to set the path to gcc (#2966)

9 years agoSystem.Posix.Temp: rm whitespace
gwern0@gmail.com [Tue, 19 Jan 2010 00:34:37 +0000 (00:34 +0000)] 
System.Posix.Temp: rm whitespace

9 years agoSystem.Posix.Temp: pad input filenames with 6 Xs
gwern0@gmail.com [Tue, 19 Jan 2010 00:30:22 +0000 (00:30 +0000)] 
System.Posix.Temp: pad input filenames with 6 Xs
If the argument doesn't terminate in capital Xs, the C mkstemp will simply bomb out
with zero warning. This was not documented.
By arbitrarily sticking a bunch of Xes at the end of all arguments, we guarantee that
this exception will not be thrown, the type signature will not change, and no existing
code can break (since if it was manually avoiding the exception by adding "XXX" itself,
the temp files will now be simply 3 random characters longer, nothing worse).

9 years agoSystem.Posix.Temp: improve haddocks for mkstemp to explain what that returned String...
gwern0@gmail.com [Tue, 19 Jan 2010 00:27:55 +0000 (00:27 +0000)] 
System.Posix.Temp: improve haddocks for mkstemp to explain what that returned String actually is

9 years agofix base dependency: should be >= 4.2 (#3780), and bump verison to 2.4.0.1
Simon Marlow [Wed, 13 Jan 2010 11:38:03 +0000 (11:38 +0000)] 
fix base dependency: should be >= 4.2 (#3780), and bump verison to 2.4.0.1

9 years agono good reason these tests should be expect_fail, as far as I can tell
Simon Marlow [Thu, 31 Dec 2009 14:57:39 +0000 (14:57 +0000)] 
no good reason these tests should be expect_fail, as far as I can tell

9 years agoSupport for DragonFly
Simon Marlow [Mon, 21 Dec 2009 11:07:09 +0000 (11:07 +0000)] 
Support for DragonFly
Not sure where this patch came from, I found it in my validate tree.

9 years agoDon't use absolute paths to headers (#3728)
Simon Marlow [Mon, 21 Dec 2009 11:06:34 +0000 (11:06 +0000)] 
Don't use absolute paths to headers (#3728)

9 years agoAdd Haiku (#3727)
Simon Marlow [Mon, 21 Dec 2009 11:05:54 +0000 (11:05 +0000)] 
Add Haiku (#3727)

9 years ago#include <fcntl.h>, not <sys/fcntl.h> (#3723)
Simon Marlow [Wed, 16 Dec 2009 10:41:54 +0000 (10:41 +0000)] 
#include <fcntl.h>, not <sys/fcntl.h> (#3723)

9 years agoforking works in GHCi too
Simon Marlow [Wed, 11 Nov 2009 14:20:55 +0000 (14:20 +0000)] 
forking works in GHCi too
Or at least, it works well enough to run this test.  The main GHCi
thread is gone after forking, but the current evaluation continues to
run.

9 years agoadd a test for #1185
Simon Marlow [Wed, 21 Oct 2009 09:07:41 +0000 (09:07 +0000)] 
add a test for #1185

9 years agorun fdReadBuf only the threaded ways (fixed unregisterised failure)
Simon Marlow [Thu, 8 Oct 2009 11:01:26 +0000 (11:01 +0000)] 
run fdReadBuf only the threaded ways (fixed unregisterised failure)

9 years agoAdd a test from trac #2969
Ian Lynagh [Wed, 23 Sep 2009 19:48:37 +0000 (19:48 +0000)] 
Add a test from trac #2969