Skip to content

Commit 5957c54

Browse files
committed
cleanup_stream_buffers() in terminate()
1 parent 2ec2155 commit 5957c54

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/base/libmesh.C

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@ void libmesh_terminate_handler()
431431
libMesh::perflog.print_log();
432432
libMesh::perflog.clear();
433433

434+
// Now that we're done with output we should clean up our stream
435+
// buffers; if we fail to uninstall_thread_buffered_sync() when
436+
// needed we can end up seeing a segfault in iostreams destructors
437+
cleanup_stream_buffers();
438+
434439
// If we have MPI and it has been initialized, we need to be sure
435440
// and call MPI_Abort instead of std::abort, so that the parallel
436441
// job can die nicely.

0 commit comments

Comments
 (0)