projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use a common definition of NULL as 0L for C and C++
[musl]
/
src
/
stdio
/
popen.c
diff --git
a/src/stdio/popen.c
b/src/stdio/popen.c
index
5a47509
..
ed20f5a
100644
(file)
--- a/
src/stdio/popen.c
+++ b/
src/stdio/popen.c
@@
-1,4
+1,7
@@
#include <fcntl.h>
#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
#include "stdio_impl.h"
#include "pthread_impl.h"
#include "syscall.h"
#include "stdio_impl.h"
#include "pthread_impl.h"
#include "syscall.h"
@@
-42,7
+45,7
@@
FILE *popen(const char *cmd, const char *mode)
if (pid) {
__release_ptc();
__syscall(SYS_close, p[1-op]);
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;
if (pid < 0) {
fclose(f);
return 0;