标签: linux block blocking pty
假设我们有一个代码
pid_t pid = forkpty(&fd, &name, NULL, NULL); if (pid < 0) return; if (pid == 0) { // child process } else { // parent process to handle pty master }
如何阻止子进程(pty slave)中的write,直到父进程(pty master)读取它。
write