Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
723da2ed
Commit
723da2ed
authored
Oct 28, 2010
by
Ian Lynagh
Browse files
Replace some exit(n) calls with stg_exit(n); fixes trac #4445
Also changed exitcode of -1 to 1 in hpc.
parent
fb9d21af
Changes
4
Hide whitespace changes
Inline
Side-by-side
rts/Hpc.c
View file @
723da2ed
...
...
@@ -51,7 +51,7 @@ failure(char *msg) {
}
else
{
fprintf
(
stderr
,
"(perhaps remove .tix file?)
\n
"
);
}
exit
(
-
1
);
stg_
exit
(
1
);
}
static
int
init_open
(
FILE
*
file
)
{
...
...
@@ -235,7 +235,7 @@ hs_hpc_module(char *modName,
fprintf
(
stderr
,
"in module '%s'
\n
"
,
tmpModule
->
modName
);
failure
(
"module mismatch with .tix/.mix file hash number"
);
fprintf
(
stderr
,
"(perhaps remove %s ?)
\n
"
,
tixFilename
);
exit
(
-
1
);
stg_
exit
(
1
);
}
for
(
i
=
0
;
i
<
modCount
;
i
++
)
{
...
...
rts/Linker.c
View file @
723da2ed
...
...
@@ -1109,7 +1109,7 @@ static void ghciInsertStrHashTable ( char* obj_name,
(
char
*
)
key
,
obj_name
);
exit
(
1
);
stg_
exit
(
1
);
}
/* -----------------------------------------------------------------------------
* initialize the object linker
...
...
rts/RtsFlags.c
View file @
723da2ed
...
...
@@ -554,7 +554,7 @@ error = rtsTrue;
else
if
(
strequal
(
"info"
,
&
rts_argv
[
arg
][
2
]))
{
printRtsInfo
();
exit
(
0
);
stg_
exit
(
0
);
}
else
{
errorBelch
(
"unknown RTS option: %s"
,
rts_argv
[
arg
]);
...
...
rts/win32/seh_excn.h
View file @
723da2ed
...
...
@@ -25,11 +25,11 @@
*
* seh_excn provides two macros, BEGIN_CATCH and END_CATCH, which
* will catch such exceptions in the code they bracket and die by
* printing a message and calling exit(1).
* printing a message and calling
stg_
exit(1).
*/
#define ON_DIV_ZERO fprintf(stdout,"divide by zero\n"); fflush(stdout);exit(1)
#define ON_STACK_OVERFLOW fprintf(stdout,"C stack overflow in generated code\n"); fflush(stdout); exit(1)
#define ON_SIGSEGV fprintf(stdout,"Segmentation fault/access violation in generated code\n"); fflush(stdout); exit(1)
#define ON_DIV_ZERO fprintf(stdout,"divide by zero\n"); fflush(stdout);
stg_
exit(1)
#define ON_STACK_OVERFLOW fprintf(stdout,"C stack overflow in generated code\n"); fflush(stdout);
stg_
exit(1)
#define ON_SIGSEGV fprintf(stdout,"Segmentation fault/access violation in generated code\n"); fflush(stdout);
stg_
exit(1)
#if defined(__MINGW32__)
extern
jmp_buf
seh_unwind_to
;
...
...
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