Version française
Home     About     Download     Resources     Contact us    
Browse thread
more patches (for Unix signal mask)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joerg Czeranski <jc@j...>
Subject: UPDATE: more patches
Hi,
my previous patch still left a lot of race conditions, and it didn't
do anything to avoid signal loss - O'Caml 2.02 only queues one
signal and forgets all others until a handler is called.

I think these patches (to be applied on top of the previous) should
fix both of the problems.
It can also easily be extended to handle a per-signal sa_mask (see
the sigaction man page).

It requires Unix signals though.  As I have neither NT nor a Mac, I
couldn't test it on any non-Unix system.

Testing is rather difficult anyway, as some cases only happen
when multiple signals arrive at almost the same time.  Therefor there
are probably still a few bugs lurking there.

As it's almost a complete rewrite of the signal stuff, I'll
gnuzip and uuencode the patches this time. :-)

These files are affected by the patches:
  otherlibs/unix/signals.c
  byterun/signals.h
  byterun/signals.c
  byterun/interp.c
  asmrun/fail.c
  asmrun/signals.c

joerch

begin 644 patch.03.gz
M'XL(```````"`^T<:W/;-O)S_"M@MY-*-B63E&3K46<N[:4]3Q.G4R?7F^ED
M.#`%26PH4B4IVVKJ_WZ[`$B")*A'G-S%:32.(X*+Q6)?V%UL\H_&5\T%3=Q9
MV^P\LMI=TCNV^L>#P=[AX2$)DQF+?.\J/EX&WNUQ[$T#ZL=MMQU&WO31BS`@
M+]V$V"?$-H?68&CVB348]/=:K5;M5#[K!5T1ZQ1^AB9,/,%9?$'UPPFP;`/@
M^",BQ<<^@6^M/4*.#\G7Y^,AR5`;U\1J=S@)QY9Y;"->2=8X]+TI^Y,\NUV0
MK\GA,4R'GZ^\P/678T:^95$4A.W9D[TC93!.(B^8PB@N-0DC,F=S=[$2TQ4P
MOCY.+B&EOA^Z.*[;6>_4.+'SG?7ZQFDOW1DAL_"&G.'.%E'HSFG\UG'GX]_.
M@\2YIG[CFKJ)%P;--R,./&9N.&8.0,<L:5S#+X,\AM]-\=J;D(:"J0&XQ7OX
M'?IC!"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