Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
6557c4cd
Commit
6557c4cd
authored
17 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
signal handler to dump stack.
parent
bdfeb5c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapApp/zmapAppwindow.c
+29
-4
29 additions, 4 deletions
src/zmapApp/zmapAppwindow.c
with
29 additions
and
4 deletions
src/zmapApp/zmapAppwindow.c
+
29
−
4
View file @
6557c4cd
...
...
@@ -26,9 +26,9 @@
*
* Exported functions: None
* HISTORY:
* Last edited:
Jan
2
8
1
5:17
2008 (
edgrif
)
* Last edited:
Apr
2
3
1
4:21
2008 (
rds
)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapAppwindow.c,v 1.4
8
2008-0
1
-2
8
1
5
:44:
46 edgrif
Exp $
* CVS info: $Id: zmapAppwindow.c,v 1.4
9
2008-0
4
-2
3
1
3
:44:
25 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -38,6 +38,7 @@
#include
<stdlib.h>
#include
<stdio.h>
#include
<signal.h>
#include
<ZMap/zmapUtils.h>
#include
<ZMap/zmapCmdLineArgs.h>
#include
<ZMap/zmapConfigDir.h>
...
...
@@ -70,7 +71,7 @@ static ZMapAppContext createAppContext(void) ;
static
gboolean
getConfiguration
(
ZMapAppContext
app_context
)
;
static
gboolean
timeoutHandler
(
gpointer
data
)
;
static
void
setup_signal_handlers
(
void
);
ZMapManagerCallbacksStruct
app_window_cbs_G
=
{
removeZMapCB
,
infoSetCB
,
quitReqCB
}
;
...
...
@@ -110,6 +111,7 @@ int zmapMainMakeAppWindow(int argc, char *argv[])
if
(
!
g_thread_supported
())
g_thread_init
(
NULL
);
setup_signal_handlers
();
/* Set up command line parsing object, globally available anywhere, this function exits if
* there are bad command line args. */
...
...
@@ -208,7 +210,7 @@ int zmapMainMakeAppWindow(int argc, char *argv[])
app_context
->
state
=
ZMAPAPP_RUNNING
;
/* Start the GUI. */
gtk_main
()
;
...
...
@@ -668,3 +670,26 @@ static gboolean timeoutHandler(gpointer data)
return
FALSE
;
}
static
void
setup_signal_handlers
(
void
)
{
/* Not much point if there's no sigaction! */
#ifndef NO_SIGACTION
struct
sigaction
signal_action
,
prev
;
sigemptyset
(
&
(
signal_action
.
sa_mask
));
/* Block other signals while handler runs. */
sigaddset
(
&
(
signal_action
.
sa_mask
),
SIGSEGV
);
sigaddset
(
&
(
signal_action
.
sa_mask
),
SIGBUS
);
sigaddset
(
&
(
signal_action
.
sa_mask
),
SIGABRT
);
signal_action
.
sa_flags
=
0
;
signal_action
.
sa_handler
=
zMapSignalHandler
;
sigaction
(
SIGSEGV
,
&
signal_action
,
&
prev
);
sigaction
(
SIGBUS
,
&
signal_action
,
&
prev
);
sigaction
(
SIGABRT
,
&
signal_action
,
&
prev
);
#endif
/* NO_SIGACTION */
return
;
}
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment