mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Change to wait for all outstanding iothreads before calling fork(). This should prevent a whole host of threading/fork interactions, but may also compromise performance...we'll see.
This commit is contained in:
4
exec.cpp
4
exec.cpp
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "iothread.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
@@ -833,6 +834,9 @@ static pid_t exec_fork()
|
||||
{
|
||||
ASSERT_IS_MAIN_THREAD();
|
||||
|
||||
/* Make sure we have no outstanding threads before we fork. This is a pretty sketchy thing to do here, both because exec.cpp shouldn't have to know about iothreads, and because the completion handlers may do unexpected things. */
|
||||
iothread_drain_all();
|
||||
|
||||
pid_t pid;
|
||||
struct timespec pollint;
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user