(prompt,dopipe) [_WIN32]: Enable the pipe capability.
This commit is contained in:
parent
380b063f9c
commit
02693bb59b
2 changed files with 2 additions and 6 deletions
|
@ -65,6 +65,8 @@ HANDLE hStdIn;
|
||||||
#define getsose() ((void)0)
|
#define getsose() ((void)0)
|
||||||
#define putso() ((void)0)
|
#define putso() ((void)0)
|
||||||
#define putse() ((void)0)
|
#define putse() ((void)0)
|
||||||
|
#define pclose _pclose
|
||||||
|
#define popen _popen
|
||||||
#else
|
#else
|
||||||
void getsose(void);
|
void getsose(void);
|
||||||
void putso(void);
|
void putso(void);
|
||||||
|
|
|
@ -130,9 +130,7 @@ prompt(FILE *auxfi)
|
||||||
(void)fclose(redir_fp);
|
(void)fclose(redir_fp);
|
||||||
redir_fp = NULL;
|
redir_fp = NULL;
|
||||||
} else if (pipe_fp) {
|
} else if (pipe_fp) {
|
||||||
#ifndef _WIN32
|
|
||||||
(void)pclose(pipe_fp);
|
(void)pclose(pipe_fp);
|
||||||
#endif
|
|
||||||
pipe_fp = NULL;
|
pipe_fp = NULL;
|
||||||
} else if (exec_fd > 0) {
|
} else if (exec_fd > 0) {
|
||||||
close(exec_fd);
|
close(exec_fd);
|
||||||
|
@ -225,11 +223,7 @@ dopipe(char *p)
|
||||||
free(tag);
|
free(tag);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifndef _WIN32
|
|
||||||
if ((pipe_fp = popen(p, "w")) == NULL) {
|
if ((pipe_fp = popen(p, "w")) == NULL) {
|
||||||
#else
|
|
||||||
if (1) {
|
|
||||||
#endif
|
|
||||||
fprintf(stderr, "Pipe open failed\n");
|
fprintf(stderr, "Pipe open failed\n");
|
||||||
perror(p);
|
perror(p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue