Skip to content

Commit

Permalink
FIX: removing leaked traces in posix version
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Nov 27, 2020
1 parent 112c087 commit 04d6335
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/os/posix/host-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ static inline REBOOL Open_Pipe_Fails(int pipefd[2]) {

close(info_pipe[R]);

printf("flag_shell in child: %hhu\n", flag_shell);
//printf("flag_shell in child: %hhu\n", flag_shell);
if (flag_shell) {
const char* sh = NULL;
const char ** argv_new = NULL;
Expand Down Expand Up @@ -1032,23 +1032,23 @@ static inline REBOOL Open_Pipe_Fails(int pipefd[2]) {
if (err_len != NULL) *err_len = 0;

if (stdin_pipe[W] > 0) {
printf("stdin_pipe[W]: %d\n", stdin_pipe[W]);
//printf("stdin_pipe[W]: %d\n", stdin_pipe[W]);
input_size = strlen((char*)input); /* the passed in input_len is in character, not in bytes */
input_len = 0;
pfds[nfds++] = (struct pollfd){.fd = stdin_pipe[W], .events = POLLOUT};
close(stdin_pipe[R]);
stdin_pipe[R] = -1;
}
if (stdout_pipe[R] > 0) {
printf("stdout_pipe[R]: %d\n", stdout_pipe[R]);
//printf("stdout_pipe[R]: %d\n", stdout_pipe[R]);
output_size = BUF_SIZE_CHUNK;
*output = OS_Make(output_size);
pfds[nfds++] = (struct pollfd){.fd = stdout_pipe[R], .events = POLLIN};
close(stdout_pipe[W]);
stdout_pipe[W] = -1;
}
if (stderr_pipe[R] > 0) {
printf("stderr_pipe[R]: %d\n", stderr_pipe[R]);
//printf("stderr_pipe[R]: %d\n", stderr_pipe[R]);
err_size = BUF_SIZE_CHUNK;
*err = OS_Make(err_size);
pfds[nfds++] = (struct pollfd){.fd = stderr_pipe[R], .events = POLLIN};
Expand Down Expand Up @@ -1251,7 +1251,7 @@ static inline REBOOL Open_Pipe_Fails(int pipefd[2]) {
close(stdin_pipe[W]);
}
stdin_pipe_err:
if(ret != 0) printf("ret: %d\n", ret);
//if(ret != 0) printf("ret: %d\n", ret);
return ret;
}

Expand Down

0 comments on commit 04d6335

Please sign in to comment.