From 51a3785482396c9f653e3e7647945bfc24f7b160 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 9 Jul 2008 22:36:46 -0400 Subject: fix shutdown race condition for scripts that might exit during begin probes --- runtime/transport/ChangeLog | 4 ++++ runtime/transport/transport.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index 3dd65408..0a157390 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,4 +1,8 @@ +2008-07-09 Frank Ch. Eigler + PR5963 + * transport.c (_stp_work_queue): Don't signal a premature exit + if a begin probe happened to exit(). 2008-06-23 Wenji Huang PR 6646 diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index a4e4e652..8fc06f37 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -160,9 +160,9 @@ static void _stp_work_queue(void *data) wake_up_interruptible(&_stp_ctl_wq); /* if exit flag is set AND we have finished with probe_start() */ - if (unlikely(_stp_exit_flag)) + if (unlikely(_stp_exit_flag && _stp_probes_started)) _stp_cleanup_and_exit(1); - else if (likely(_stp_attached)) + if (likely(_stp_attached)) queue_delayed_work(_stp_wq, &_stp_work, STP_WORK_TIMER); } -- cgit