Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
904e1d67
Commit
904e1d67
authored
Oct 21, 2003
by
sof
Browse files
[project @ 2003-10-21 03:38:07 by sof]
stg_InstallConsoleEvent(): registering generic_handler() once will do
parent
1820f42c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/rts/win32/ConsoleHandler.c
View file @
904e1d67
...
...
@@ -83,7 +83,6 @@ void initDefaultHandlers(void)
if
(
!
SetConsoleCtrlHandler
(
shutdown_handler
,
TRUE
)
)
{
prog_belch
(
"warning: failed to install default console handler"
);
}
}
...
...
@@ -221,8 +220,11 @@ stg_InstallConsoleEvent(int action, StgStablePtr *handler)
break
;
case
STG_SIG_HAN
:
console_handler
=
(
StgInt
)
*
handler
;
if
(
!
SetConsoleCtrlHandler
(
generic_handler
,
TRUE
)
)
{
if
(
previous_hdlr
<
0
)
{
/* Only install generic_handler() once */
if
(
!
SetConsoleCtrlHandler
(
generic_handler
,
TRUE
)
)
{
prog_belch
(
"warning: unable to install console event handler"
);
}
}
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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