#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
#include "stdio_impl.h"
#include "pthread_impl.h"
#include "syscall.h"
if (pid) {
__release_ptc();
__syscall(SYS_close, p[1-op]);
- sigprocmask(SIG_BLOCK, SIGALL_SET, &old);
+ sigprocmask(SIG_SETMASK, &old, 0);
if (pid < 0) {
fclose(f);
return 0;