aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2009-04-07 14:45:10 +0200
committerJuan Cespedes <cespedes@debian.org>2009-04-07 14:45:10 +0200
commit375ef8e667be88645f6af6bb099f04471c7f53cd (patch)
treea7285043a3bcf17ed145082fcb50ca4838e2f373
parent714ee9df1696e696d5bd2e9d95c13e9f5051eb73 (diff)
downloadltrace-375ef8e667be88645f6af6bb099f04471c7f53cd.tar.gz
Fixed SEGFAULT when killing ltrace with SIGINT or SIGTERM
-rw-r--r--BUGS1
-rw-r--r--ltrace.c4
-rw-r--r--process_event.c1
3 files changed, 0 insertions, 6 deletions
diff --git a/BUGS b/BUGS
index 129e135..bd9a73e 100644
--- a/BUGS
+++ b/BUGS
@@ -6,4 +6,3 @@
* 2008-12-29: this line in config file does not work (2nd argument not used):
string setlocale(enum(LC_ALL=6), string);
* 2009-04-07 fork() and clone() are not always followed
-* 2009-04-07 ltrace segfaults when killed with SIGTERM
diff --git a/ltrace.c b/ltrace.c
index b76865f..d35785f 100644
--- a/ltrace.c
+++ b/ltrace.c
@@ -50,10 +50,6 @@ static void
signal_exit(int sig) {
exiting = 1;
debug(1, "Received interrupt signal; exiting...");
- if (options.output) {
- fclose(options.output);
- options.output = NULL;
- }
signal(SIGINT, SIG_IGN);
signal(SIGTERM, SIG_IGN);
signal(SIGALRM, signal_alarm);
diff --git a/process_event.c b/process_event.c
index 2461b7d..269ab6b 100644
--- a/process_event.c
+++ b/process_event.c
@@ -164,7 +164,6 @@ process_signal(struct event *event) {
disable_all_breakpoints(event->proc);
untrace_pid(pid);
remove_proc(event->proc);
- continue_after_signal(pid, event->e_un.signum);
return;
}
output_line(event->proc, "--- %s (%s) ---",