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(
22392239 else if (childpid == 0 )
22402240 {
22412241 // Close the read end of the pipe, the child doesn't need it
2242+ int callbackResult = 0 ;
22422243 close (parent_pipe);
22432244
22442245 // Only dup the child's stderr if there is error buffer
@@ -2252,7 +2253,12 @@ PROCCreateCrashDump(
22522253 SEHCleanupSignals (true /* isChildProcess */ );
22532254
22542255 // 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);
22562262 }
22572263 else
22582264 {
You can’t perform that action at this time.
0 commit comments