Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142228221
D40976.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
995 B
Referenced Files
None
Subscribers
None
D40976.diff
View Options
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
@@ -685,9 +685,19 @@
break;
}
- if (Pstate(P) != PS_UNDEAD && Psetrun(P, 0, 0) == -1) {
- dt_dprintf("pid %d: failed to set running: %s\n",
- (int)dpr->dpr_pid, strerror(errno));
+ if (Pstate(P) != PS_UNDEAD) {
+ if (dpr->dpr_quit && (proc_getflags(P) & PR_KLC)) {
+ /*
+ * We're about to kill the child, so don't
+ * bother resuming it. In some cases, such as
+ * an initialization error, we shouldn't have
+ * started it in the first place, so letting it
+ * run could be harmful.
+ */
+ } else if (Psetrun(P, 0, 0) == -1) {
+ dt_dprintf("pid %d: failed to set running: "
+ "%s\n", (int)dpr->dpr_pid, strerror(errno));
+ }
}
(void) pthread_mutex_unlock(&dpr->dpr_lock);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 1:10 PM (8 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27709944
Default Alt Text
D40976.diff (995 B)
Attached To
Mode
D40976: dtrace: prevent forked child from running after an error condition
Attached
Detach File
Event Timeline
Log In to Comment