simonmar [Thu, 17 Nov 2005 11:28:44 +0000 (11:28 +0000)]
[project @ 2005-11-17 11:28:43 by simonmar]
ProcessHandle is now an MVar, in which we cache the ExitCode of the
process when we know it.
Additionally, waitForProcess and getProcessExitCode now close the
handle eagerly on Windows, this avoids a problem with hsc2hs which
wants to remove the executable it just ran, and it can't if the handle
is still open.
jpbernardy [Sun, 13 Nov 2005 16:52:14 +0000 (16:52 +0000)]
[project @ 2005-11-13 16:52:14 by jpbernardy]
Correct handling of negative numbers in split and splitMember in IntMap and IntSet.
Better documentation for insert and insertWith in Maps.
simonmar [Fri, 11 Nov 2005 14:41:01 +0000 (14:41 +0000)]
[project @ 2005-11-11 14:41:01 by simonmar]
waitForProcess: if the process died with a signal, just return the
exit status rather than EINTR.
This means a segfault shows up as (ExitFailure 139) rather than
an exception complaining about system call interruption. If the
client wants a more unix-ish interpretation, they probably should be
using System.Posix.Process anyway.
simonmar [Fri, 11 Nov 2005 12:01:58 +0000 (12:01 +0000)]
[project @ 2005-11-11 12:01:58 by simonmar]
On Windows, attach a finalizer to the ProcessHandle so that we can
call CloseHandle() when the handle is no longer in use. Previously we
were calling CloseHandle() in waitForProcess and terminateProcess,
which prevented making multiple calls to these functions on the same
handle.
simonmar [Fri, 11 Nov 2005 10:37:35 +0000 (10:37 +0000)]
[project @ 2005-11-11 10:37:35 by simonmar]
Fix bugs in new signal handling machinery
simonmar [Thu, 10 Nov 2005 12:58:32 +0000 (12:58 +0000)]
[project @ 2005-11-10 12:58:32 by simonmar]
Some docs for System.Posix, from Bj?rn Bringert
simonmar [Mon, 7 Nov 2005 16:39:04 +0000 (16:39 +0000)]
[project @ 2005-11-07 16:39:04 by simonmar]
add GHC notes to mallocForeignPtr
sof [Thu, 27 Oct 2005 01:39:40 +0000 (01:39 +0000)]
[project @ 2005-10-27 01:39:40 by sof]
[mingw/msys only]
Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e.,
the linker wasn't correctly generating relocatable object files when
the number of relocs exceeded 2^16. Worked around the issue by
hackily splitting up the GHCi object file for the larger packages
('base', 'ObjectIO' and 'win32') into a handful of object files,
each with a manageable number of relocs. Tiresome and error-prone
(but the hack has served us well!)
This commit imposes a restriction on the 'ld' you use to compile
up GHC with; it now has to be ld-2.15.x or later (something GHC
binary dists have shipped with since 6.2.2)
ross [Wed, 26 Oct 2005 22:52:58 +0000 (22:52 +0000)]
[project @ 2005-10-26 22:52:58 by ross]
missing part of rev. 1.13: in unfoldForestM_BF, the output sequence is
now in the right order, so don't reverse it.
sof [Tue, 25 Oct 2005 17:31:38 +0000 (17:31 +0000)]
[project @ 2005-10-25 17:31:38 by sof]
FPTOOLS_CHECK_HTYPE: correctly scope the resetting of CPPFLAGS; as was,
it got blown away if the value was cached.
Merge to STABLE.
simonmar [Tue, 25 Oct 2005 12:01:11 +0000 (12:01 +0000)]
[project @ 2005-10-25 12:01:11 by simonmar]
fix findExecutable (I hope; don't have an up to date Windows build to
test on).
simonmar [Tue, 25 Oct 2005 11:13:53 +0000 (11:13 +0000)]
[project @ 2005-10-25 11:13:53 by simonmar]
forkIO the signal handlers directly from the IO manager thread, rather
than calling an RTS function to do the same thing.
ross [Tue, 25 Oct 2005 09:29:47 +0000 (09:29 +0000)]
[project @ 2005-10-25 09:29:47 by ross]
add Monoid instance
ross [Tue, 25 Oct 2005 09:29:16 +0000 (09:29 +0000)]
[project @ 2005-10-25 09:29:16 by ross]
Now that Data.Monoid is portable, move Monoid instances for sets and
maps back to where the data types are defined.
ross [Tue, 25 Oct 2005 09:11:25 +0000 (09:11 +0000)]
[project @ 2005-10-25 09:11:25 by ross]
Change the Monoid instance for functions (as proposed on the libraries
list, and interpreting silence as assent) from composition to pointwise
combination.
Rationale: The new instance is consistent with the instances for tuples,
it's compositional, in that it builds instances for complex types out
of instances for simpler ones, and it makes this module Haskell 98.
Downside: the old instance was easy to use with Writer monads, and ShowS
was a special case. You can get that effect using the new Endo type,
but you have to wrap and unwrap the newtype.
Also added a few other simple monoids: dual, sum and product.
simonmar [Tue, 25 Oct 2005 09:01:48 +0000 (09:01 +0000)]
[project @ 2005-10-25 09:01:48 by simonmar]
Note that throwTo blocks if the target thread is in a foreign call.
ross [Sat, 22 Oct 2005 00:37:01 +0000 (00:37 +0000)]
[project @ 2005-10-22 00:37:01 by ross]
docs (readListDefault seems pretty useless)
ross [Sat, 22 Oct 2005 00:28:21 +0000 (00:28 +0000)]
[project @ 2005-10-22 00:28:21 by ross]
define readListPrec too.
ross [Fri, 21 Oct 2005 16:31:23 +0000 (16:31 +0000)]
[project @ 2005-10-21 16:31:23 by ross]
oops
ross [Fri, 21 Oct 2005 16:25:45 +0000 (16:25 +0000)]
[project @ 2005-10-21 16:25:45 by ross]
Data and FunctorM instances for View[LR].
simonmar [Fri, 21 Oct 2005 13:10:48 +0000 (13:10 +0000)]
[project @ 2005-10-21 13:10:48 by simonmar]
cmp_thread returns CInt, not Int
ross [Fri, 21 Oct 2005 10:47:25 +0000 (10:47 +0000)]
[project @ 2005-10-21 10:47:25 by ross]
conformant Show and Read instances.
(sorry to jump in, JP, but I had these to hand)
ross [Fri, 21 Oct 2005 10:39:56 +0000 (10:39 +0000)]
[project @ 2005-10-21 10:39:56 by ross]
conformant Show and Read instances
ross [Fri, 21 Oct 2005 10:26:57 +0000 (10:26 +0000)]
[project @ 2005-10-21 10:26:57 by ross]
conformant Show and Read instances
ross [Fri, 21 Oct 2005 10:24:58 +0000 (10:24 +0000)]
[project @ 2005-10-21 10:24:58 by ross]
export parens, which is useful for writing Read instances.
ross [Fri, 21 Oct 2005 06:54:13 +0000 (06:54 +0000)]
[project @ 2005-10-21 06:54:13 by ross]
repair findExecutable
ross [Thu, 20 Oct 2005 23:28:42 +0000 (23:28 +0000)]
[project @ 2005-10-20 23:28:42 by ross]
revise Read instance to match < and > as chars rather than lexemes,
as suggested by Georg Martius.
krasimir [Thu, 20 Oct 2005 18:07:53 +0000 (18:07 +0000)]
[project @ 2005-10-20 18:07:53 by krasimir]
The original version of @findExecutable@ was looking only in the $PATH but under
Windows the executables are searched in the current directory, in $PATH and
in some other places too. The new version is based on @SearchPath@ function from
Win32 API. This is more consistent with @system@ and @rawSystem@
krasimir [Thu, 20 Oct 2005 17:12:28 +0000 (17:12 +0000)]
[project @ 2005-10-20 17:12:28 by krasimir]
from Neil Mitchell:
On Windows, the path can be path;"c:\ghc\ghc-6.4\bin";restofpath, and
thats still a valid path with GHC in it. Cabal doesn't find ghc with
the quotes in, removing them does find it though.
malcolm [Thu, 20 Oct 2005 15:14:22 +0000 (15:14 +0000)]
[project @ 2005-10-20 15:14:22 by malcolm]
Add spaces in Show instance, to avoid lexing problems e.g. Foo:=-0.9 in Read.
ross [Thu, 20 Oct 2005 15:08:35 +0000 (15:08 +0000)]
[project @ 2005-10-20 15:08:35 by ross]
Read instance
malcolm [Thu, 20 Oct 2005 10:58:44 +0000 (10:58 +0000)]
[project @ 2005-10-20 10:58:44 by malcolm]
Instance of Read for Map, from Georg Martius.
simonmar [Tue, 18 Oct 2005 11:36:25 +0000 (11:36 +0000)]
[project @ 2005-10-18 11:36:25 by simonmar]
Fixes to enable base to be compiled with -fasm on Windows:
- a few stdcall/ccall mismatches
- use GetTempPathA instead of GetTempPath (a couple of these)
ross [Thu, 13 Oct 2005 11:09:51 +0000 (11:09 +0000)]
[project @ 2005-10-13 11:09:50 by ross]
update non-portability reasons
ross [Thu, 13 Oct 2005 10:36:42 +0000 (10:36 +0000)]
[project @ 2005-10-13 10:36:42 by ross]
MArray instance for Lazy.ST
ross [Thu, 13 Oct 2005 10:35:49 +0000 (10:35 +0000)]
[project @ 2005-10-13 10:35:49 by ross]
comments re strict/lazy monads
simonpj [Wed, 12 Oct 2005 10:57:40 +0000 (10:57 +0000)]
[project @ 2005-10-12 10:57:40 by simonpj]
Comments
sof [Mon, 10 Oct 2005 23:32:51 +0000 (23:32 +0000)]
[project @ 2005-10-10 23:32:51 by sof]
CSsize fix: this Haskell type is defined iff HTYPE_SSIZE_T is. Merge to STABLE
simonmar [Wed, 5 Oct 2005 14:04:28 +0000 (14:04 +0000)]
[project @ 2005-10-05 14:04:28 by simonmar]
hPutChar should (probably) not be strict in its Char argument
simonmar [Wed, 5 Oct 2005 13:15:44 +0000 (13:15 +0000)]
[project @ 2005-10-05 13:15:44 by simonmar]
mention that -O turns assertions off
ross [Wed, 5 Oct 2005 08:43:26 +0000 (08:43 +0000)]
[project @ 2005-10-05 08:43:26 by ross]
add Monad and MonadPlus instances
ross [Thu, 29 Sep 2005 09:31:58 +0000 (09:31 +0000)]
[project @ 2005-09-29 09:31:58 by ross]
Tweak Read instance: allow optional parentheses around the outside
(for consistency), and don't propagate precedence to elements.
malcolm [Wed, 28 Sep 2005 13:18:28 +0000 (13:18 +0000)]
[project @ 2005-09-28 13:18:28 by malcolm]
Add an instance of Read to correspond to the existing Show instance.
(Implementation based on H'98 Report definition of 'readList'.)
panne [Sat, 24 Sep 2005 15:07:49 +0000 (15:07 +0000)]
[project @ 2005-09-24 15:07:49 by panne]
Synched all FPTOOLS_CHECK_HTYPE definitions with the latest changes in
libraries/OpenAL/aclocal.m4. Although it is not strictly necessary, keeping
things identical is good for consistency. At some point in time we should
really find a way to eliminate all this redundancy... *sigh*
ross [Thu, 22 Sep 2005 09:43:01 +0000 (09:43 +0000)]
[project @ 2005-09-22 09:43:01 by ross]
some docs
simonmar [Wed, 21 Sep 2005 11:54:59 +0000 (11:54 +0000)]
[project @ 2005-09-21 11:54:59 by simonmar]
improve documentation for getProcessExitCode
ross [Mon, 19 Sep 2005 23:24:31 +0000 (23:24 +0000)]
[project @ 2005-09-19 23:24:31 by ross]
For compilers other than MSVC and GCC, assume inline has the C99 semantics.
panne [Sun, 18 Sep 2005 10:01:57 +0000 (10:01 +0000)]
[project @ 2005-09-18 10:01:57 by panne]
Fixed a few underquoted definitions.
dons [Sun, 18 Sep 2005 02:22:33 +0000 (02:22 +0000)]
[project @ 2005-09-18 02:22:33 by dons]
Typo in comment only. Spotted by heatsink on #haskell.
simonmar [Fri, 2 Sep 2005 14:04:38 +0000 (14:04 +0000)]
[project @ 2005-09-02 14:04:38 by simonmar]
back out rev. 1.22; as pointed out by Krasimir Angelov, the
optimisation doesn't work (sadly).
ross [Thu, 1 Sep 2005 10:49:07 +0000 (10:49 +0000)]
[project @ 2005-09-01 10:49:07 by ross]
GHC only: define toList using build
ross [Wed, 31 Aug 2005 12:15:31 +0000 (12:15 +0000)]
[project @ 2005-08-31 12:15:31 by ross]
Hugs: use custom versioon of unsafeInterleaveIO
ross [Fri, 5 Aug 2005 09:48:16 +0000 (09:48 +0000)]
[project @ 2005-08-05 09:48:16 by ross]
haddock stuff
simonmar [Thu, 4 Aug 2005 11:40:26 +0000 (11:40 +0000)]
[project @ 2005-08-04 11:40:26 by simonmar]
fix typo in subRegex (fixes subRegex breakage on Windows)
simonmar [Mon, 1 Aug 2005 13:23:22 +0000 (13:23 +0000)]
[project @ 2005-08-01 13:23:22 by simonmar]
Fix
[ ghc-Bugs-1249226 ] runInteractiveProcess and closed stdin.
ross [Fri, 29 Jul 2005 17:17:22 +0000 (17:17 +0000)]
[project @ 2005-07-29 17:17:22 by ross]
document deprecation
ross [Fri, 29 Jul 2005 17:03:37 +0000 (17:03 +0000)]
[project @ 2005-07-29 17:03:37 by ross]
deprecate in favour of Data.Sequence
ross [Fri, 29 Jul 2005 17:02:07 +0000 (17:02 +0000)]
[project @ 2005-07-29 17:02:07 by ross]
use Data.Sequence instead of Data.Queue
ross [Thu, 28 Jul 2005 13:27:03 +0000 (13:27 +0000)]
[project @ 2005-07-28 13:27:03 by ross]
avoid warnings
simonmar [Wed, 27 Jul 2005 10:04:26 +0000 (10:04 +0000)]
[project @ 2005-07-27 10:04:26 by simonmar]
expand docs for touchForeignPtr and newConcForeignPtr
ross [Wed, 27 Jul 2005 00:52:33 +0000 (00:52 +0000)]
[project @ 2005-07-27 00:52:33 by ross]
Hugs only: no longer need backslash fiddle now that Hugs leaves them alone.
ross [Tue, 26 Jul 2005 11:00:42 +0000 (11:00 +0000)]
[project @ 2005-07-26 11:00:42 by ross]
this version of closeFd is used by GHC only
ross [Tue, 26 Jul 2005 09:37:28 +0000 (09:37 +0000)]
[project @ 2005-07-26 09:37:27 by ross]
PrelHandle functions are only needed by GHC
ross [Sat, 23 Jul 2005 17:08:03 +0000 (17:08 +0000)]
[project @ 2005-07-23 17:08:03 by ross]
non-GHC: implement rawSystem by translating the string for system.
ross [Sat, 23 Jul 2005 13:28:24 +0000 (13:28 +0000)]
[project @ 2005-07-23 13:28:24 by ross]
Hugs: omit commandToProcess
ross [Fri, 22 Jul 2005 16:25:16 +0000 (16:25 +0000)]
[project @ 2005-07-22 16:25:16 by ross]
revert 1.17
simonmar [Fri, 22 Jul 2005 10:18:51 +0000 (10:18 +0000)]
[project @ 2005-07-22 10:18:51 by simonmar]
check the return value of chdir()
[ 1242598 ] runProcess uses cwd for bad working directory argument
ross [Fri, 22 Jul 2005 08:15:06 +0000 (08:15 +0000)]
[project @ 2005-07-22 08:15:06 by ross]
unbreak for non-GHC
simonmar [Thu, 21 Jul 2005 12:54:33 +0000 (12:54 +0000)]
[project @ 2005-07-21 12:54:33 by simonmar]
Hack Makefiles so that 'make distclean' works even if the tree has not
been configured, or 'make distclean' has already been run.
This is to solve problems caused by 'make distclean' removing files
that it needs itself - previously we were arranging to remove certain
files right at the end of cleaning, but this is fragile. So now we
assume that e.g. the X11 library is always enabled when we're
cleaning.
ross [Thu, 21 Jul 2005 11:08:51 +0000 (11:08 +0000)]
[project @ 2005-07-21 11:08:51 by ross]
specialize instances too
ross [Thu, 21 Jul 2005 11:00:17 +0000 (11:00 +0000)]
[project @ 2005-07-21 11:00:17 by ross]
revise Data instance again, making it like lists
ross [Thu, 21 Jul 2005 10:59:27 +0000 (10:59 +0000)]
[project @ 2005-07-21 10:59:27 by ross]
more SPECIALIZE pragmas
simonmar [Thu, 21 Jul 2005 10:00:34 +0000 (10:00 +0000)]
[project @ 2005-07-21 10:00:34 by simonmar]
Further optimisations to ForeignPtr: now we don't allocate the IORef
for a ForeignPtr without a finalizer.
simonmar [Thu, 21 Jul 2005 09:26:30 +0000 (09:26 +0000)]
[project @ 2005-07-21 09:26:30 by simonmar]
copyFile: copy the permissions properly (don't use getPermissions >>=
setPermissions, which only copies the owner's permissions on Unix).
ross [Tue, 19 Jul 2005 23:22:39 +0000 (23:22 +0000)]
[project @ 2005-07-19 23:22:39 by ross]
use feature tests instead of $host to locate socket library
ross [Tue, 19 Jul 2005 17:33:23 +0000 (17:33 +0000)]
[project @ 2005-07-19 17:33:23 by ross]
improved definition of gfold for Seq a
ross [Tue, 19 Jul 2005 17:06:18 +0000 (17:06 +0000)]
[project @ 2005-07-19 17:06:18 by ross]
hook in Data.Sequence
ross [Tue, 19 Jul 2005 09:26:03 +0000 (09:26 +0000)]
[project @ 2005-07-19 09:26:03 by ross]
use $host instead of $target (mainly affects builds with cabal)
ross [Thu, 14 Jul 2005 15:36:32 +0000 (15:36 +0000)]
[project @ 2005-07-14 15:36:31 by ross]
remove redundant definitions of unsafeRangeSize (same as default)
ross [Thu, 14 Jul 2005 11:59:27 +0000 (11:59 +0000)]
[project @ 2005-07-14 11:59:27 by ross]
Data.Sequence: general purpose finite sequences
(as discussed on the libraries list in May 2005).
ross [Thu, 14 Jul 2005 11:57:09 +0000 (11:57 +0000)]
[project @ 2005-07-14 11:57:09 by ross]
Hugs only: more specific imports
ross [Sun, 10 Jul 2005 23:01:24 +0000 (23:01 +0000)]
[project @ 2005-07-10 23:01:24 by ross]
doc fix from Remi Turk
MERGE to STABLE
sof [Fri, 8 Jul 2005 17:17:31 +0000 (17:17 +0000)]
[project @ 2005-07-08 17:17:31 by sof]
- System.Posix.Internals.FDType.RawDevice: new constructor.
- System.Posix.Internals.fdType: map block devices to RawDevice
(but left character devices as still being Streams).
- GHC.IOBase.isReadWriteHandleType: new HandleType predicate.
- GHC.Handle.hIsSeekable: RawDevices are seekable.
- GHC.Handle.openFd: handle RawDevices.
=> opening of block devices via std IO opening actions
(open{Binary}File, openFd etc.) should now work better.
Merge to STABLE.
simonmar [Fri, 8 Jul 2005 13:17:47 +0000 (13:17 +0000)]
[project @ 2005-07-08 13:17:47 by simonmar]
oops, fix imports
simonmar [Fri, 8 Jul 2005 12:22:02 +0000 (12:22 +0000)]
[project @ 2005-07-08 12:22:02 by simonmar]
Fix instance Eq Version
malcolm [Wed, 6 Jul 2005 16:17:36 +0000 (16:17 +0000)]
[project @ 2005-07-06 16:17:36 by malcolm]
Fix (from Scott Turner) for a broken implementation of 'split'.
simonmar [Wed, 6 Jul 2005 12:25:53 +0000 (12:25 +0000)]
[project @ 2005-07-06 12:25:53 by simonmar]
runProcess: allow duplicate Handles to be passed in without deadlock.
Fixes #1187295.
simonmar [Wed, 6 Jul 2005 12:13:04 +0000 (12:13 +0000)]
[project @ 2005-07-06 12:13:04 by simonmar]
Close Handles passed to runProcess. Fixes #1187302
ross [Mon, 4 Jul 2005 10:22:17 +0000 (10:22 +0000)]
[project @ 2005-07-04 10:22:17 by ross]
add Typeable instance
simonmar [Mon, 27 Jun 2005 22:31:41 +0000 (22:31 +0000)]
[project @ 2005-06-27 22:31:41 by simonmar]
As discussed on ghc-users some time ago, optimise the representation
of ForeignPtr to make withForeignPtr more efficient. ForeignPtr is
now represented by a pair of an Addr# and a ForeignPtrContents object.
withForeignPtr just extracts the Addr# and touches the
ForeignPtrContents.
ForeignPtr no longer uses the primitive ForeignObj# type: it isn't
required, since we attach the finalizer to the IORef inside
ForeignPtrContents now. In fact, the ForeignObj# type is now
obsolete, and can be removed.
simonmar [Mon, 27 Jun 2005 13:56:32 +0000 (13:56 +0000)]
[project @ 2005-06-27 13:56:32 by simonmar]
Fix performance buglet: small Float literals weren't being simplified
enough because the fromInteger method is defined in terms of
encodeFloat, which itself is an FFI call. Double was already fixed,
this change does the right thing for Float too.
simonpj [Fri, 10 Jun 2005 13:21:52 +0000 (13:21 +0000)]
[project @ 2005-06-10 13:21:52 by simonpj]
Make toConstr strict for tuples, so that it's uniform with
all other data types.
This inconsistency is really a bug:
MERGE to STABLE
simonpj [Fri, 10 Jun 2005 13:19:41 +0000 (13:19 +0000)]
[project @ 2005-06-10 13:19:41 by simonpj]
Eta-contract foldr/app RULE to avoid overlap with foldr/id
simonmar [Fri, 27 May 2005 19:26:34 +0000 (19:26 +0000)]
[project @ 2005-05-27 19:26:34 by simonmar]
hLookAhead: don't wait for a completely full buffer
sof [Fri, 13 May 2005 16:58:02 +0000 (16:58 +0000)]
[project @ 2005-05-13 16:58:02 by sof]
flush_input_console__(): if the fd isn't connected to a console, treat flush as a NOP. Merge to STABLE.
sof [Fri, 6 May 2005 00:30:57 +0000 (00:30 +0000)]
[project @ 2005-05-06 00:30:56 by sof]
[mingw only]
Work around bug in win32 Console API which showed up in the GHCi UI:
if the user typed in characters prior to the appearance of the prompt,
the first of these characters always came out as a 'g'. The GHCi UI does
for good reasons one-character reads from 'stdin', which causes the
underlying APIs to become confused. A simple repro case is the following
piece of C code:
/*----------------------*/
#include <stdio.h>
#include <windows.h>
int main()
{
char ch1,ch2;
HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
DWORD dw;
/* Type in some characters before the prompt appears and be amused.. */
sleep(1000); printf("? ");
ReadConsoleA(hStdIn,&ch1,1,&dw,NULL);
ReadConsoleA(hStdIn,&ch2,1,&dw,NULL);
/* or, if you want to use libc:
read(0,&ch1,1); read(0,&ch2,1); */
printf("%c%c\n", ch1,ch2);
return 0;
}
/*----------------------*/
This happens across win32 OSes, and I can't see anything untoward as far
as API usage goes (the GHC IO implementation uses read(), but that
reduces to ReadConsoleA() calls.) People inside the Behemoth might want
to have a closer look at this..
Not much we can do about this except work around the problem by flushing
the input buffer prior to reading from stdin. Not ideal, as type-ahead
is a useful feature. Flushing is handled by GHC.ConsoleHandler.flushConsole
Merge to STABLE.
simonmar [Wed, 4 May 2005 15:07:47 +0000 (15:07 +0000)]
[project @ 2005-05-04 15:07:47 by simonmar]
Do *not* inline runSTRep now (see comments for details).
simonmar [Mon, 25 Apr 2005 13:25:08 +0000 (13:25 +0000)]
[project @ 2005-04-25 13:25:08 by simonmar]
Only ftruncate() regular files.
sof [Fri, 22 Apr 2005 17:00:49 +0000 (17:00 +0000)]
[project @ 2005-04-22 17:00:49 by sof]
[mingw only]
Better handling of I/O request abortions upon throwing an exception
to a Haskell thread. As was, a thread blocked on an I/O request was
simply unblocked, but its corresponding worker thread wasn't notified
that the request had been abandoned.
This manifested itself in GHCi upon Ctrl-C being hit at the prompt -- the
worker thread blocked waiting for input on stdin prior to Ctrl-C would
stick around even though its corresponding Haskell thread had been
thrown an Interrupted exception. The upshot was that the worker would
consume the next character typed in after Ctrl-C, but then just dropping
it. Dealing with this turned out to be even more interesting due to
Win32 aborting any console reads when Ctrl-C/Break events are delivered.
The story could be improved upon (at the cost of portability) by making
the Scheduler able to abort worker thread system calls; as is, requests
are cooperatively abandoned. Maybe later.
Also included are other minor tidyups to Ctrl-C handling under mingw.
Merge to STABLE.
sof [Fri, 22 Apr 2005 16:07:36 +0000 (16:07 +0000)]
[project @ 2005-04-22 16:07:36 by sof]
make DEBUG_DUMP-conditional code compile