File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/coreclr/pal/src/thread Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2239,6 +2239,7 @@ PROCCreateCrashDump(
2239
2239
else if (childpid == 0 )
2240
2240
{
2241
2241
// Close the read end of the pipe, the child doesn't need it
2242
+ int callbackResult = 0 ;
2242
2243
close (parent_pipe);
2243
2244
2244
2245
// Only dup the child's stderr if there is error buffer
@@ -2252,7 +2253,12 @@ PROCCreateCrashDump(
2252
2253
SEHCleanupSignals (true /* isChildProcess */ );
2253
2254
2254
2255
// Call the statically linked createdump code
2255
- g_createdumpCallback (argv.size (), argv.data ());
2256
+ callbackResult = g_createdumpCallback (argv.size (), argv.data ());
2257
+ // Set the shutdown callback to nullptr and exit
2258
+ // If we don't exit, the child's execution will continue into the diagnostic server behavior
2259
+ // which causes all sorts of problems.
2260
+ g_shutdownCallback = nullptr ;
2261
+ exit (callbackResult);
2256
2262
}
2257
2263
else
2258
2264
{
You can’t perform that action at this time.
0 commit comments