summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/ctl.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-04-24 13:55:19 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-04-24 13:55:19 -0400
commitf72154b33e67069cd7c308d24255574b9fbacb1d (patch)
treed10ac52e86e22b744b68806a075ba36196c933c8 /runtime/staprun/ctl.c
parentf90f92615df6ff2a62282359281889597e5dbf17 (diff)
downloadsystemtap-steved-f72154b33e67069cd7c308d24255574b9fbacb1d.tar.gz
systemtap-steved-f72154b33e67069cd7c308d24255574b9fbacb1d.tar.xz
systemtap-steved-f72154b33e67069cd7c308d24255574b9fbacb1d.zip
PR6451: avoid one class of staprun shutdown deadlock (module/.ctl filehandle = 0)
Diffstat (limited to 'runtime/staprun/ctl.c')
-rw-r--r--runtime/staprun/ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/staprun/ctl.c b/runtime/staprun/ctl.c
index 15c5c3d3..4597bf72 100644
--- a/runtime/staprun/ctl.c
+++ b/runtime/staprun/ctl.c
@@ -46,8 +46,8 @@ int init_ctl_channel(const char *name, int verb)
void close_ctl_channel(void)
{
- if (control_channel > 0) {
+ if (control_channel >= 0) {
close(control_channel);
- control_channel = 0;
+ control_channel = -1;
}
}