Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e4a98ec1
Commit
e4a98ec1
authored
Jun 15, 2001
by
Ove Kaaven
Committed by
Alexandre Julliard
Jun 15, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Block SIGINT and SIGALRM in signal handlers.
parent
2b27fcd9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
4 deletions
+40
-4
exception.c
dlls/ntdll/exception.c
+4
-0
signal_i386.c
dlls/ntdll/signal_i386.c
+22
-4
signal_sparc.c
dlls/ntdll/signal_sparc.c
+14
-0
No files found.
dlls/ntdll/exception.c
View file @
e4a98ec1
...
...
@@ -37,6 +37,8 @@ typedef struct
# error You must define GET_IP for this CPU
#endif
extern
void
SIGNAL_Unblock
(
void
);
void
WINAPI
EXC_RtlRaiseException
(
PEXCEPTION_RECORD
,
PCONTEXT
);
void
WINAPI
EXC_RtlUnwind
(
PEXCEPTION_FRAME
,
LPVOID
,
PEXCEPTION_RECORD
,
DWORD
,
PCONTEXT
);
...
...
@@ -174,6 +176,8 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
if
(
send_debug_event
(
rec
,
TRUE
,
context
)
==
DBG_CONTINUE
)
return
;
/* continue execution */
SIGNAL_Unblock
();
/* we may be in a signal handler, and exception handlers may jump out */
frame
=
NtCurrentTeb
()
->
except
;
nested_frame
=
NULL
;
while
(
frame
!=
(
PEXCEPTION_FRAME
)
0xFFFFFFFF
)
...
...
dlls/ntdll/signal_i386.c
View file @
e4a98ec1
...
...
@@ -346,6 +346,8 @@ typedef struct
DEFAULT_DEBUG_CHANNEL
(
seh
);
static
sigset_t
all_sigs
;
/***********************************************************************
* get_trap_code
...
...
@@ -617,6 +619,17 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
}
/***********************************************************************
* SIGNAL_Unblock
*
* Unblock signals. Called from EXC_RtlRaiseException.
*/
void
SIGNAL_Unblock
(
void
)
{
sigprocmask
(
SIG_UNBLOCK
,
&
all_sigs
,
NULL
);
}
/**********************************************************************
* do_segv
*
...
...
@@ -840,8 +853,9 @@ static int set_handler( int sig, int have_sigaltstack, void (*func)() )
{
struct
kernel_sigaction
sig_act
;
sig_act
.
ksa_handler
=
func
;
sig_act
.
ksa_flags
=
SA_RESTART
|
SA_NOMASK
;
sig_act
.
ksa_mask
=
0
;
sig_act
.
ksa_flags
=
SA_RESTART
;
sig_act
.
ksa_mask
=
(
1
<<
(
SIGINT
-
1
))
|
(
1
<<
(
SIGALRM
-
1
));
/* point to the top of the stack */
sig_act
.
ksa_restorer
=
(
char
*
)
NtCurrentTeb
()
->
signal_stack
+
SIGNAL_STACK_SIZE
;
return
wine_sigaction
(
sig
,
&
sig_act
,
NULL
);
...
...
@@ -849,9 +863,11 @@ static int set_handler( int sig, int have_sigaltstack, void (*func)() )
#endif
/* linux */
sig_act
.
sa_handler
=
func
;
sigemptyset
(
&
sig_act
.
sa_mask
);
sigaddset
(
&
sig_act
.
sa_mask
,
SIGINT
);
sigaddset
(
&
sig_act
.
sa_mask
,
SIGALRM
);
#ifdef linux
sig_act
.
sa_flags
=
SA_RESTART
|
SA_NOMASK
;
sig_act
.
sa_flags
=
SA_RESTART
;
#elif defined (__svr4__) || defined(_SCO_DS)
sig_act
.
sa_flags
=
SA_SIGINFO
|
SA_RESTART
;
#else
...
...
@@ -887,7 +903,9 @@ BOOL SIGNAL_Init(void)
#endif
/* linux */
}
#endif
/* HAVE_SIGALTSTACK */
sigfillset
(
&
all_sigs
);
/* automatic child reaping to avoid zombies */
signal
(
SIGCHLD
,
SIG_IGN
);
...
...
dlls/ntdll/signal_sparc.c
View file @
e4a98ec1
...
...
@@ -24,6 +24,7 @@
DEFAULT_DEBUG_CHANNEL
(
seh
);
static
sigset_t
all_sigs
;
/*
* FIXME: All this works only on Solaris for now
...
...
@@ -325,6 +326,17 @@ static int set_handler( int sig, void (*func)() )
}
/***********************************************************************
* SIGNAL_Unblock
*
* Unblock signals. Called from EXC_RtlRaiseException.
*/
void
SIGNAL_Unblock
(
void
)
{
sigprocmask
(
SIG_UNBLOCK
,
&
all_sigs
,
NULL
);
}
/**********************************************************************
* SIGNAL_Init
*/
...
...
@@ -335,6 +347,8 @@ BOOL SIGNAL_Init(void)
/* automatic child reaping to avoid zombies */
signal
(
SIGCHLD
,
SIG_IGN
);
sigfillset
(
&
all_sigs
);
if
(
set_handler
(
SIGINT
,
(
void
(
*
)())
int_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGFPE
,
(
void
(
*
)())
fpe_handler
)
==
-
1
)
goto
error
;
if
(
set_handler
(
SIGSEGV
,
(
void
(
*
)())
segv_handler
)
==
-
1
)
goto
error
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment