Set SA_RESTART sigaction flag for other BSDs beside NetBSD

Dmitry Timoshkov dmitry at baikal.ru
Mon Feb 23 05:32:06 CST 2004


Hello,

hopefully this patch will fix one of the problems preventing Wine
running on FreeBSD.

This is a pure speculation, since I have no FreeBSD to test this on,
but the patch is based on the information from the fido7.ru.unix.prog's
Signals FAQ (approximate translation from russian):

"If at least one signal, which has a not default handler, has no SA_RESTART
flag set and that signal has not been blocked, EINTR might interrupt _any_
standard library i/o function."

And since we have that code already enabled for __NetBSD__ I see no reason
why it shouldn't be done for other BSDs as well.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Set SA_RESTART sigaction flag for other BSDs beside NetBSD.

--- cvs/hq/wine/dlls/ntdll/signal_i386.c	Fri Jan 16 02:52:56 2004
+++ wine/dlls/ntdll/signal_i386.c	Mon Feb 23 11:12:22 2004
@@ -1152,7 +1152,7 @@ static int set_handler( int sig, int hav
     sigaddset( &sig_act.sa_mask, SIGINT );
     sigaddset( &sig_act.sa_mask, SIGUSR2 );
 
-#if defined(linux) || defined(__NetBSD__)
+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
     sig_act.sa_flags = SA_RESTART;
 #elif defined (__svr4__) || defined(_SCO_DS)
     sig_act.sa_flags = SA_SIGINFO | SA_RESTART;






More information about the wine-patches mailing list