You need to sign in or sign up before continuing.
use direct syscall rather than write function in posix_spawn child
the write function is a cancellation point and accesses thread-local state belonging to the calling thread in the parent process. since cancellation is blocked for the duration of posix_spawn, this is probably safe, but it's fragile and unnecessary. making the syscall directly is just as easy and clearly safe.
Showing
想要评论请 注册 或 登录