| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
It's very unlikely the current `unix` code stands any chance of even
remotely work with Hugs...
|
| |
|
| |
|
|
|
|
|
|
| |
This is a follow-up to 17192d89e6 which missed that export.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
and remove code to support older versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
versions, for setProcessGroupID and createProcessGroup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions need to be given a new name, and the header files contain
some __asm hackery in order to let the program call the correct function.
This mean that you need to use the header files in order to call the
correct system functions, which prevents things like "foreign import ccall" from working.
Ghc solves this with wrapper functions for some of the renamed functions,
but it has not been updated for newer versions of NetBSD that has recently
versioned some more functions.
The attached patches introduces wrapper functions for all currently
NetBSD-versioned functions used in libraries/unix. Solves ~20 testsuite
failures.
Contributed by: Krister Walfridsson <krister.walfridsson@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API is the same (for now). 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.
#2451 is the ticket for the new API.
The main purpose of bringing this in now is to fix race conditions in
the old signal handling code (#2858). Later we can enable the new
API in the HEAD.
Implementation differences:
- More of the signal-handling is moved into Haskell. We store the
table of signal handlers in an MVar, rather than having a table of
StablePtrs in the RTS.
- In the threaded RTS, the siginfo of the signal is passed down the
pipe to the IO manager thread, which manages the business of
starting up new signal handler threads. In the non-threaded RTS,
the siginfo of caught signals is stored in the RTS, and the
scheduler starts new signal handler threads.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also adds System.Posix.Process.Internals in order to make the deps work out.
|
| |
|
| |
|
| |
|
|
|
|
| |
Some docs for System.Posix, from Bj?rn Bringert
|
|
|
|
|
| |
Hugs only: replace the CBITS pragma (files relative to cbits) with
CFILES (files relative to the root of the package).
|
|
|
|
|
| |
Fix bug in forkProcess: we weren't wrapping the forked IO action in
the default exception handler, so exitFailure wasn't working properly.
|
|
|
|
|
| |
Unbreak Hugs by moving pPrPr_disableITimers and execvpe to System.Posix.Internals
(base package) and use it from System.Posix.Process (unix package).
|
|
|
|
| |
Unbreak Hugs, 2nd try...
|
|
|
|
| |
Unbreak Hugs: execvpe.c has gone
|
|
|
|
|
|
|
|
|
| |
Add filenames to all errors where it makes sense. I've added
System.Posix.Error with a new family of error-throwing functions,
throwErrnoPath*. This seemed to make the most sense: they don't
belong in Foreign.C.Error (C by itself has no notion of paths).
Fixes: [ 954378 ] getFileStatus does not include the file name in IO-Error
|
|
|
|
|
| |
change the foreign import of waitpid to "safe", so that we can use it
in a non-blocking way with the threaded RTS.
|
|
|
|
|
|
| |
Hugs only: add most of the rest of System.Posix
(I wonder why SIG_UNBLOCK and SIG_SETMASK are switched in HsBase.h)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New implementation & changed type signature of forkProcess
forkProcess now has the following type:
forkProcess :: IO () -> IO ProcessID
forkProcessAll has been removed as it is unimplementable in the threaded RTS.
forkProcess using the old type (IO (Maybe ProcessID)) was impossible to
implement correctly in the non-threaded RTS and very hard to implement
in the threaded RTS.
The new type signature allows a clean and simple implementation.
|
|
|
|
| |
More import tweaking for Haddock
|
|
|
|
| |
waitpid() may return EINTR, so use throwErrnoifMinus1Retry
|
|
|
|
| |
Revert previous commit, I've fixed Haddock instead.
|
|
|
|
| |
Flatten the doc structure a bit.
|
|
|
|
| |
Fixed markup confusion ("" vs. '')
|
|
|
|
| |
Monad->Control.Monad
|
|
|
|
| |
Update comments to reflect new module System.Posix.Env
|
|
|
|
| |
Fix 'nice': -1 is a permissible return value in a successful situation
|
|
|
|
|
|
|
| |
- Rename System.Posix.Process.forkProcess to forkProcessAll
- Move GHC.Conc.forkProcess to System.Posix with type 'Maybe ProcessID'
Prompted by: George Russel
|
|
|
|
|
|
|
|
|
| |
Fill in some more bits in the new Unix library: specifically the
contents of PosixTTY and PosixDB (now System.Posix.Terminal and
System.Posix.User respectively).
We're now about 95% complete w.r.t. the old posix library. I've
identified the reminaing bits to do in System/Posix.hs.
|
|
|
|
|
|
|
|
|
| |
Make the new Posix bindings compile on Mac OS X.
Most notable, Mac OS X lacks
*) lchown
*) SIGPOLL
I don't know of a replacement of either, so they are just left out when
they are not detected by configure.
|