aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
Commit message (Collapse)AuthorAge
* Refactor local `execvpe(3)` implementationGravatar Herbert Valerio Riedel2014-12-06
| | | | | | | | | | | | | | | | | The previous code was prone to conflicts with when the platform happens to expose a `execvpe(3)` implementation in its libc. This commit renames the internal implementation to `__hsunix_execvpe` as well as adding an autoconf-detection for the presence of `execvpe(3)`, in which case `__hsunix_execvpe()` forwards the call to `execvpe(3)`. Moreover, the code has been cleaned up to remove likely bitrotted CPP conditionals. This should fix #22 (This also partially addresses #11 on platforms which have a libc-provided `execvpe(3)`)
* Tighten Safe Haskell bounds, fixes new warning in GHC 7.10.Gravatar David Terei2014-12-06
| | | | Closes #27
* Merge pull request #18 from neverpanic/masterGravatar Herbert Valerio Riedel2014-11-07
|\ | | | | `System.Posix.Files.fileAccess` fails inside OS X sandbox
* | fix _FILE_OFFSET_BITS redefined warning on Solaris/x86Gravatar Karel Gardas2014-10-18
| | | | | | | | | | | | | | | | | | | | The issue is that sys/types.h header on Solaris includes somehow /usr/include/sys/feature_tests.h which tests if _FILE_OFFSET_BITS is defined and if not, then it defines it to 32 if we're compiling 32 bit code (x86). This is simply wrong since we'd like to have it defined to 64. The issue is solved by including HsUnixConfig.h first which defines _FILE_OFFSET_BITS to 64 and feature_tests.h is later OK with that.
* | Use CAPI FFI imports for `truncate`Gravatar Herbert Valerio Riedel2014-10-18
| | | | | | | | | | This makes sure we pick up the LFS version of `truncate` in case `off_t` is affected by CPP defines such as `_FILE_OFFSET_BITS`.
* | Use correct POSIX offset-type for tell/seekdirGravatar Herbert Valerio Riedel2014-10-18
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the FFI imports to use the proper `CLong` type over the previous incorrect `COff` type, as using the wrong argument type can cause problems when the `long` and `off_t` types have different size. Historic note from the manual page: In glibc up to version 2.1.1, the return type of telldir() was off_t. POSIX.1-2001 specifies long, and this is the type used since glibc 2.1.2 (released in 1999).
| * Accept EPERM as valid error code for access(2)Gravatar Clemens Lang2014-09-21
| | | | | | | | | | | | | | This is useful on OS X when its sandboxing mechanism is used, because that will set errno = EPERM when a file can't be written due to sandboxing (as opposed to setting it to EACCES when file permissions deny writing).
| * Unify accepted errno flags for accessGravatar Clemens Lang2014-09-21
| | | | | | | | | | | | | | The ByteString variant of the access function didn't accept the same flags as the non-ByteString one, but it makes sense that the OS doesn't care about which one is being used and returns all error codes for both variants.
| * Unify whitespace in System/Posix/Files/ByteStringGravatar Clemens Lang2014-09-21
|/
* Use import list for `Data.Time.Clock.POSIX`Gravatar Herbert Valerio Riedel2014-09-10
| | | | | This makes it more obvious why `unix` depends on `time` in the first place, i.e. for the sole purpose of reusing the `POSIXTime` type.
* fix getGroupEntryForID/Name on SolarisGravatar Karel Gardas2014-09-10
| | | | | | | | | This patch fixes getGroupEntryForID and getGroupEntryForName on Solaris The issue on Solaris is that it defines both required getgrgid_r and getgrnam_r functions as CPP macros which depending on configuration are mapped to real function implementations with different names. The issue is solved by using C API calling convention instead of platform C ABI calling convention.
* Deprecate function `haveRtldLocal`Gravatar Thomas Miedema2014-07-04
| | | | | | | | The function haveRtldLocal was introduced for compatibility with Cygwin on Mar 28 2002 in GHC commit 4740cf56c774b92e02d31b4666158d70c2e85a8f. According to https://cygwin.com/viewvc/src/winsup/cygwin/include/dlfcn.h RTLD_LOCAL has been available on Cygwin since Revision 1.4 (August 9 2010).
* Remove unnecessary checks for RTLD_NOW and RTLD_GLOBALGravatar Thomas Miedema2014-07-04
| | | | | | | | | | | These checks were introduced for OpenBSD on July 16 2002 in GHC commit 03e9edb3094fd3bb38ed886b96ee9f61f39e9b53. According to http://www.openbsd.org/cgi-bin/cvsweb/src/include/dlfcn.h RTLD_NOW, RTLD_GLOBAL and RTLD_LOCAL have been available on OpenBSD since Revision 1.8 (September 2 2003). This is merely code cleanup.
* Add haddock comments on RTLD_NEXT and RTLD_DEFAULTGravatar Thomas Miedema2014-07-04
| | | | Related ticket: #8902.
* Typo in commentGravatar Gabor Greif2014-03-23
|
* fix getFileStatus: interrupted (Interrupted system call) build failure on ↵Gravatar Karel Gardas2014-02-28
| | | | | | | | | Solaris Patch provided by Christian Maeder <Christian.Maeder@dfki.de> Signed-off-by: Karel Gardas <karel.gardas@centrum.cz> Signed-off-by: Austin Seipp <austin@well-typed.com>
* M-x delete-trailing-whitespace & M-x untabifyGravatar Herbert Valerio Riedel2014-02-06
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Handle EROFS/ETXTBSY as permission denied in `fileAccess` (re #8741)Gravatar Alain O'Dea2014-02-06
| | | | | | | | | | This extends `System.Posix.Files.`access` to map EROFS & ETXTBSY to mean permission denied just like EACCESS. Based on a patch by Alain O'Dea and comments by Duncan Coutts Authored-by: Alain O'Dea <alain.odea@verafin.com> Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Export `forkProcessWithUnmask` from `System.Posix.Process`Gravatar Herbert Valerio Riedel2013-11-08
| | | | | | This is a follow-up to 17192d89e6 which missed that export. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* `M-x untabify` & `M-x delete-trailing-whitespace`Gravatar Herbert Valerio Riedel2013-11-08
| | | | | | ...on recently touched files Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix markup for function names in DEPRECATION messagesGravatar Herbert Valerio Riedel2013-11-08
| | | | | | This helps Haddock make tose hyperlinked functions. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add `forkProcessWithUnmask` functionGravatar Herbert Valerio Riedel2013-11-08
| | | | | | This seemed to be an obvious addition while working on #8433. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix `forkProcess` to inherit caller's `MaskingState`Gravatar Herbert Valerio Riedel2013-11-08
| | | | | | | | | | ...and while at it, use `bracket` to fix a potential resource leak due to `freeStablePtr` not being called if `throwErrnoIfMinus1` throws an exception. This fixes #8433 Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Kill trailing whitespaceGravatar Herbert Valerio Riedel2013-11-07
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Remove misleading paragraph in `fdToHandle`'s HaddockGravatar Herbert Valerio Riedel2013-11-07
| | | | | | | The removed paragraph is obsolete and does no longer apply to the implementation as noted by Duncan in #8286. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix #7912 by using `CApiFFI` for `<termios.h>` importsGravatar Herbert Valerio Riedel2013-11-07
| | | | | | | | On Android, the functions imported from `<termios.h>` are actually inlined functions, so we need to wrap them via the `capi` calling convention. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Temporary workaround for addressing #7359Gravatar Herbert Valerio Riedel2013-11-07
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix build on OS XGravatar Bryan O'Sullivan2013-10-12
|
* Drop trailing whitespaceGravatar Bryan O'Sullivan2013-10-12
|
* Fix a type defaulting warningGravatar Bryan O'Sullivan2013-10-12
| | | | (And a small matter of using != instead of /= -- how embarrassing!)
* Fix assumption that RLIM_INFINITY is a simple numberGravatar Bryan O'Sullivan2013-10-12
| | | | | On MacOS X, it is defined as "(((__uint64_t)1 << 63) - 1)", and hence cannot be used inside C preprocessor logic.
* Drop trailing whitespaceGravatar Bryan O'Sullivan2013-10-12
|
* Make `-Wall` clean and drop `-fno-warn-unused-imports`Gravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | CPP conditional code sections have been carefully taken into account while performing this warning cleanup. Most `OPTIONS_GHC` declarations could be dropped (now only a lonely `{-# OPTIONS_GHC -fno-cse #-}` remains in `Posix.Signals`). Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Make compatible again for GHC back to 7.4.1Gravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | | | By avoiding `import Foreign` this accomplishes backward-compatibility w.r.t. the `unsafePerformIO` relocation w/o resorting to CPP conditionals. Moreover, in order to support base<4.7 this commits needs to reintroduce a harmless backport of `newFilePath`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add `changelog` file and `/Since: 2.7.0.0/` notesGravatar Herbert Valerio Riedel2013-10-12
| | | | | | | The changelog file will be shown on Hackage once it's included in the source tarball. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Declare language extensions via `{-# LANGUAGE -#}`Gravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | Only language extensions not active when `-XHaskell2010` is enabled are declared, this way we can drop many redundant `{-# LANGUAGE ForeignFunctionInterface #-}` occurences. This commit also removes/replaces some `{-# OPTIONS_GHC -XRecordWildCards #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Make sure `HAVE_{SEEK,TELL}DIR` are in scopeGravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | This is a follow-up to b8fb0a0a9 which made the module exports of `tellDirStream` and `seekDirStream` CPP-conditional but didn't explicitly include `HsUnixConfig.h` which defines the respective CPP defines. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Unconditionalize imports in System.Posix.UserGravatar Reid Barton2013-10-09
| | | | | | Their use site is now unconditional. Issue #8223. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Extract the result of get*_r before we deallocate the auxiliary bufferGravatar Marios Titas2013-08-10
| | | | | | Also comes with tests. This closes #8108. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Export SignalInfo(..), SignalSpecificInfo(..); completes #2451Gravatar Ian Lynagh2013-07-21
|
* Add "deprecated in" comments to deprecated pragmasGravatar Ian Lynagh2013-02-19
|
* Follow changes in baseGravatar Ian Lynagh2013-02-16
|
* cope with missing telldir/seekdir (for Android)Gravatar Simon Marlow2013-01-30
| | | | Submitted by: Nathan Hüsken <nathan.huesken@posteo.de>
* cope with missing pw_gecos (for Android)Gravatar Simon Marlow2013-01-30
| | | | Submitted by: Nathan Hüsken <nathan.huesken@posteo.de>
* Indicate whether a process dumped core in the ProcessStatusGravatar Simon Marlow2013-01-25
| | | | | | | | | | | | | | | The Bool field of Terminated is new, as is the documentation: data ProcessStatus = Exited ExitCode -- ^ the process exited by calling -- @exit()@ or returning from @main@ | Terminated Signal Bool -- ^ the process was terminated by a -- signal, the @Bool@ is @True@ if a core -- dump was produced | Stopped Signal -- ^ the process was stopped by a signal deriving (Eq, Ord, Show) This is an API change, hence will need a major version bump.
* Import waitpid() with interruptibleGravatar Simon Marlow2013-01-25
|
* Use pthread_kill on OS X tooGravatar Ian Lynagh2013-01-17
| | | | Fixes signals004(threaded1,threaded2) on OS X 32.
* Fix some parenthesesGravatar Ian Lynagh2013-01-17
| | | | I assume that this is what was intended.
* Fix putenv; trac #7342Gravatar Ian Lynagh2012-12-01
| | | | | We were freeing the string, but the string becomes part of the environment.
* Bump base lower version to 4.5 (the version GHC 7.4.1 came with)Gravatar Ian Lynagh2012-11-30
| | | | and remove code to support older versions