Lines Matching refs:fdp
772 handledesc(void *v, int fd, int fdp[3][2]) in handledesc()
778 movedesc(v, STDIN_FILENO, fdp[STDIN_FILENO][0]); in handledesc()
779 if (fdp[STDIN_FILENO][1] > 2) in handledesc()
780 closedesc(v, fdp[STDIN_FILENO][1]); in handledesc()
786 movedesc(v, STDOUT_FILENO, fdp[STDOUT_FILENO][1]); in handledesc()
787 if (fdp[STDOUT_FILENO][0] > 2) in handledesc()
788 closedesc(v, fdp[STDOUT_FILENO][0]); in handledesc()
792 movedesc(v, STDERR_FILENO, fdp[STDERR_FILENO][1]); in handledesc()
793 if (fdp[STDERR_FILENO][0] > 2) in handledesc()
794 closedesc(v, fdp[STDERR_FILENO][0]); in handledesc()
880 int fdp[3][2]; in uncompressbuf() local
914 for (i = 0; i < __arraycount(fdp); i++) in uncompressbuf()
915 fdp[i][0] = fdp[i][1] = -1; in uncompressbuf()
931 if ((fd == -1 && file_pipe_closexec(fdp[STDIN_FILENO]) == -1) || in uncompressbuf()
932 file_pipe_closexec(fdp[STDOUT_FILENO]) == -1 || in uncompressbuf()
933 file_pipe_closexec(fdp[STDERR_FILENO]) == -1) { in uncompressbuf()
934 closep(fdp[STDIN_FILENO]); in uncompressbuf()
935 closep(fdp[STDOUT_FILENO]); in uncompressbuf()
944 handledesc(&fa, fd, fdp); in uncompressbuf()
970 handledesc(NULL, fd, fdp); in uncompressbuf()
980 for (i = 1; i < __arraycount(fdp); i++) in uncompressbuf()
981 closefd(fdp[i], 1); in uncompressbuf()
984 closefd(fdp[STDIN_FILENO], 0); in uncompressbuf()
985 writepid = writechild(fdp[STDIN_FILENO][1], old, *n); in uncompressbuf()
986 closefd(fdp[STDIN_FILENO], 1); in uncompressbuf()
997 r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0); in uncompressbuf()
1001 DPRINTF("Read stdout failed %d (%s)\n", fdp[STDOUT_FILENO][0], in uncompressbuf()
1006 (r = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) in uncompressbuf()
1024 closefd(fdp[STDIN_FILENO], 1); in uncompressbuf()
1025 closefd(fdp[STDOUT_FILENO], 0); in uncompressbuf()
1026 closefd(fdp[STDERR_FILENO], 0); in uncompressbuf()
1049 closefd(fdp[STDIN_FILENO], 0); //why? it is already closed here! in uncompressbuf()