summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-07-09 22:36:46 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-07-09 22:36:46 -0400
commit51a3785482396c9f653e3e7647945bfc24f7b160 (patch)
treeb9266ce436d6454fe8314a2993e824ffa81e0fa5
parent25814e6c66b461380bbc9ef8fa263c868983efa6 (diff)
downloadsystemtap-steved-51a3785482396c9f653e3e7647945bfc24f7b160.tar.gz
systemtap-steved-51a3785482396c9f653e3e7647945bfc24f7b160.tar.xz
systemtap-steved-51a3785482396c9f653e3e7647945bfc24f7b160.zip
fix shutdown race condition for scripts that might exit during begin probes
-rw-r--r--runtime/transport/ChangeLog4
-rw-r--r--runtime/transport/transport.c4
2 files changed, 6 insertions, 2 deletions
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 <fche@elastic.org>
+ PR5963
+ * transport.c (_stp_work_queue): Don't signal a premature exit
+ if a begin probe happened to exit().
2008-06-23 Wenji Huang <wenji.huang@oracle.com>
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);
}