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
bdf83bc5
Commit
bdf83bc5
authored
Aug 01, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed SIGNAL_MaskAsyncEvents and cleaned up signal handling.
parent
beb8fabf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
54 deletions
+11
-54
exception.c
dlls/ntdll/exception.c
+6
-6
miscemu.h
include/miscemu.h
+1
-2
module.c
loader/dos/module.c
+0
-2
signal.c
loader/signal.c
+4
-44
No files found.
dlls/ntdll/exception.c
View file @
bdf83bc5
...
...
@@ -690,15 +690,15 @@ static HANDLER_DEF(EXC_int)
*/
void
EXC_InitHandlers
(
void
)
{
SIGNAL_SetHandler
(
SIGINT
,
(
void
(
*
)())
EXC_int
,
1
);
SIGNAL_SetHandler
(
SIGFPE
,
(
void
(
*
)())
EXC_fpe
,
1
);
SIGNAL_SetHandler
(
SIGSEGV
,
(
void
(
*
)())
EXC_segv
,
1
);
SIGNAL_SetHandler
(
SIGILL
,
(
void
(
*
)())
EXC_segv
,
1
);
SIGNAL_SetHandler
(
SIGINT
,
(
void
(
*
)())
EXC_int
);
SIGNAL_SetHandler
(
SIGFPE
,
(
void
(
*
)())
EXC_fpe
);
SIGNAL_SetHandler
(
SIGSEGV
,
(
void
(
*
)())
EXC_segv
);
SIGNAL_SetHandler
(
SIGILL
,
(
void
(
*
)())
EXC_segv
);
#ifdef SIGBUS
SIGNAL_SetHandler
(
SIGBUS
,
(
void
(
*
)())
EXC_segv
,
1
);
SIGNAL_SetHandler
(
SIGBUS
,
(
void
(
*
)())
EXC_segv
);
#endif
#ifdef SIGTRAP
SIGNAL_SetHandler
(
SIGTRAP
,
(
void
(
*
)())
EXC_trap
,
1
);
SIGNAL_SetHandler
(
SIGTRAP
,
(
void
(
*
)())
EXC_trap
);
#endif
return
;
}
include/miscemu.h
View file @
bdf83bc5
...
...
@@ -186,8 +186,7 @@ extern void WINAPI XMS_Handler(CONTEXT86*);
/* loader/signal.c */
extern
BOOL
SIGNAL_Init
(
void
);
extern
void
SIGNAL_SetHandler
(
int
sig
,
void
(
*
func
)(),
int
flags
);
extern
void
SIGNAL_MaskAsyncEvents
(
BOOL
flag
);
extern
void
SIGNAL_SetHandler
(
int
sig
,
void
(
*
func
)()
);
/* misc/aspi.c */
extern
void
ASPI_DOS_HandleInt
(
CONTEXT86
*
context
);
...
...
loader/dos/module.c
View file @
bdf83bc5
...
...
@@ -423,8 +423,6 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask )
/* put our pipes somewhere dosmod can find them */
dup2
(
write_fd
[
0
],
0
);
/* stdin */
dup2
(
x_fd
,
1
);
/* stdout */
/* enable signals */
SIGNAL_MaskAsyncEvents
(
FALSE
);
/* now load dosmod */
/* check argv[0]-derived paths first, since the newest dosmod is most likely there
* (at least it was once for Andreas Mohr, so I decided to make it easier for him) */
...
...
loader/signal.c
View file @
bdf83bc5
...
...
@@ -87,31 +87,12 @@ static inline int wine_sigaction( int sig, struct kernel_sigaction *new,
/* Signal stack */
static
char
SIGNAL_Stack
[
16384
];
static
sigset_t
async_signal_set
;
/**********************************************************************
* SIGNAL_child
*
* wait4 terminated child processes
*/
static
HANDLER_DEF
(
SIGNAL_child
)
{
HANDLER_INIT
();
#ifdef HAVE_WAIT4
wait4
(
0
,
NULL
,
WNOHANG
,
NULL
);
#elif defined (HAVE_WAITPID)
/* I am sort-of guessing that this is the same as the wait4 call. */
waitpid
(
0
,
NULL
,
WNOHANG
);
#else
wait
(
NULL
);
#endif
}
/**********************************************************************
* SIGNAL_SetHandler
*/
void
SIGNAL_SetHandler
(
int
sig
,
void
(
*
func
)()
,
int
flags
)
void
SIGNAL_SetHandler
(
int
sig
,
void
(
*
func
)()
)
{
int
ret
;
...
...
@@ -119,7 +100,7 @@ void SIGNAL_SetHandler( int sig, void (*func)(), int flags )
struct
kernel_sigaction
sig_act
;
sig_act
.
sa_handler
=
func
;
sig_act
.
sa_flags
=
SA_RESTART
|
(
flags
)
?
SA_NOMASK
:
0
;
sig_act
.
sa_flags
=
SA_RESTART
|
SA_NOMASK
;
sig_act
.
sa_mask
=
0
;
/* Point to the top of the stack, minus 4 just in case, and make
it aligned */
...
...
@@ -153,19 +134,6 @@ void SIGNAL_SetHandler( int sig, void (*func)(), int flags )
}
}
extern
void
stop_wait
(
int
a
);
extern
void
WINSOCK_sigio
(
int
a
);
extern
void
ASYNC_sigio
(
int
a
);
/**********************************************************************
* SIGNAL_MaskAsyncEvents
*/
void
SIGNAL_MaskAsyncEvents
(
BOOL
flag
)
{
sigprocmask
(
(
flag
)
?
SIG_BLOCK
:
SIG_UNBLOCK
,
&
async_signal_set
,
NULL
);
}
/**********************************************************************
* SIGNAL_Init
...
...
@@ -184,18 +152,10 @@ BOOL SIGNAL_Init(void)
}
#endif
/* HAVE_SIGALTSTACK */
sigemptyset
(
&
async_signal_set
);
SIGNAL_SetHandler
(
SIGCHLD
,
(
void
(
*
)())
SIGNAL_child
,
1
);
#ifdef SIGIO
sigaddset
(
&
async_signal_set
,
SIGIO
);
/* SIGNAL_SetHandler( SIGIO, (void (*)())WINSOCK_sigio, 0); */
SIGNAL_SetHandler
(
SIGIO
,
(
void
(
*
)())
ASYNC_sigio
,
0
);
#endif
sigaddset
(
&
async_signal_set
,
SIGALRM
);
/* ignore SIGPIPE so that WINSOCK can get a EPIPE error instead */
signal
(
SIGPIPE
,
SIG_IGN
);
/* automatic child reaping to avoid zombies */
signal
(
SIGCHLD
,
SIG_IGN
);
EXC_InitHandlers
();
return
TRUE
;
}
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