| Commit message (Collapse) | Author | Age |
|
|
|
| |
More getpw*_r result checks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix getpwnam_r-handling: getpwnam_r returns (always?) 0, you have
to check result* (pppw[0])!
Truss-log from querying first "root", then "" on SunOS 5.9:
<- libc:__posix_getpwnam_r() = 0
"root"
-> libc:__posix_getpwnam_r(0xff1bf8a8, 0xff1bf460, 0xff1bf490, 0x400)
<- libc:__posix_getpwnam_r() = 0
Yes, that's 0 in both cases. (I wasn't even able to elicit an ERANGE btw.)
Reported by: Peter Simons
|
|
|
|
|
| |
Fix bug in forkProcess: we weren't wrapping the forked IO action in
the default exception handler, so exitFailure wasn't working properly.
|
|
|
|
|
| |
- sleep, usleep: make thread-safe
- add Haddock comments
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement System.Posix.User.getUserEntryFor{ID,Name} on platforms
without reentrant versions of getpw{uid,nam}. This includes all the BSDs.
While I'm here, close getGroupEntryFor* "Result too large" bug on
OpenBSD, mentioned last year:
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2003-September/003601.html
grBufSize was too small, apparently.
Thanks to Ian Lynagh for hint to do the locking.
|
|
|
|
|
|
|
|
|
| |
Add System.Posix.Signals.Exts which re-exports S.P.Signals and adds the
two signals SIGINFO on (*BSD) and SIGWINCH (most Unices) which are not
in POSIX.
You should use cpp to test if those are defined before using them. This is
encouraged by not providing dummy-definitions on platforms which do not
offer that particular flavour.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Inverted logic would call dlerror() after a successful dlclose() and
cause a segfault.
Noticed by: abe.egnor At gmail.com
|
|
|
|
|
| |
change the foreign import of waitpid to "safe", so that we can use it
in a non-blocking way with the threaded RTS.
|
|
|
|
|
|
| |
Remove redundant _POSIX_PTHREAD_SEMANTICS. It's defined on the command line
and also set too late/in the wrong place (after including system prototypes),
anyway.
|
|
|
|
|
|
|
| |
solaris_TARGET_OS -> solaris2_TARGET_OS
(and tweak the #define while I'm here)
Works for Hugs, still untested for GHC, but presumably needed for STABLE.
|
|
|
|
|
|
|
| |
- fix typo in error message
- a bit of manual CSE for fcntl-flags
- use Data.Bits instead of brains
- make (unexported) function names a bit more consistent
|
|
|
|
|
|
| |
drop cygwin #ifdef; not an issue with current versions.
merge to stable
|
|
|
|
|
|
| |
code tidyup
merge to stable
|
|
|
|
|
|
| |
fdRead: drop superfluous array copying
merge to stable
|
|
|
|
| |
Hugs only: add handleToFd
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
No reason we can't support sys/mman.h: move it to the ToDo section.
|
|
|
|
|
|
|
| |
Untested fix for Solaris to get the right versions of getgrnam_r and
friends.
I'd appreciate it if someone with a Solaris build could test this.
|
|
|
|
|
|
|
|
| |
Kill mktemp: it causes link warnings whenever someone uses -package
unix on Linux & FreeBSD at least, and is bogus anyway.
mktemp is still used to implement mkstemp when !GLASGOW_HASKELL and
!HUGS. Why is this?
|
|
|
|
| |
fileExist should not throw an exception if the file does not exist.
|
|
|
|
|
|
|
|
| |
#ifdef's for the _PC_SYNC_IO, _PC_ASYNC_IO, _PC_FILESIZEBITS,
_PC_SYMLINK_MAX.
These 4 symbols are not universal: FreeBSD and Linux and the only
OS's that appear to have them at the moment.
|
|
|
|
| |
Implement pathconf()/fpathconf() wrappers.
|
|
|
|
| |
Export TerminalAttributes abstractly
|
|
|
|
| |
More import tweaking for Haddock
|
|
|
|
|
| |
Export Module (abstractly), otherwise the user is unable to write
signatures involving this type. Improves Haddock hyperlinks, too.
|
|
|
|
| |
jiggle to make System.Posix.Directory work for Hugs
|
|
|
|
|
|
|
|
| |
Move System.Sendfile to Network.Sendfile:
- Linux can sendfile() to a fd, but BSD couldn't
- sendfile() on Linux is probably now disabled on most builds because of
the LARGEFILE issue
=> Change API to use type Socket
|
|
|
|
| |
Haddock: Add link to 'handleToFd'
|
|
|
|
| |
Hook up System.Posix.Temp.
|
|
|
|
| |
waitpid() may return EINTR, so use throwErrnoifMinus1Retry
|
|
|
|
| |
Can't use sendfile() with LARGEFILES on Linux
|
|
|
|
|
| |
/me slaps haddock with a large piece of trout.
Someone please remind me of running 'make html' before committing.
|
|
|
|
|
|
|
| |
Throw in mktemp() as well, as the non-GHC/Hugs case
was essentially that. Advantage: At least on FreeBSD
the linker will print out a warning whenever you use
mktemp().
|
|
|
|
| |
Hugs only: use fdToHandle (like GHC)
|
|
|
|
| |
Hugs only: make fdToHandle available
|
|
|
|
|
|
| |
Return file name as well
Suggested by: Martin Norb?ck
|
|
|
|
|
|
|
| |
Add mkstemp() wrapper, including (unsafe) fallback for non-GHCs
(fdToHandle required).
Suggested by: Martin Sj?gren
|
|
|
|
| |
fix type error
|
|
|
|
| |
No (un)setenv until SUSv3 (e.g. Solaris 2.9). (fallback untested)
|
|
|
|
| |
Revert previous commit, I've fixed Haddock instead.
|
|
|
|
| |
Flatten the doc structure a bit.
|
|
|
|
|
| |
- My fault, so take ownership
- Strip unnecessary #include while here
|
|
|
|
| |
Look for 'bracket' in the right place
|
|
|
|
| |
Move dlfcn.h to the "supported" list.
|
|
|
|
|
|
|
|
|
| |
- move System.DL to System.Posix.DynamicLinker
- take ownership
There's a compiler warning when passing the 'const char*' result from
dlerror() to peekCString (discarded qualifier). Does an FFI-expert know
how to get rid of this warning?
|