summaryrefslogtreecommitdiffstats
path: root/runtime/transport/transport.c
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 /runtime/transport/transport.c
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
Diffstat (limited to 'runtime/transport/transport.c')
-rw-r--r--runtime/transport/transport.c4
1 files changed, 2 insertions, 2 deletions
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);
}