Lines Matching refs:desc
661 static int set_proc_descriptor_to_blackhole(descriptorspec_item *desc) in set_proc_descriptor_to_blackhole() argument
664 desc->childend = CreateFileA("nul", GENERIC_READ | GENERIC_WRITE, in set_proc_descriptor_to_blackhole()
666 if (desc->childend == NULL) { in set_proc_descriptor_to_blackhole()
671 desc->childend = open("/dev/null", O_RDWR); in set_proc_descriptor_to_blackhole()
672 if (desc->childend < 0) { in set_proc_descriptor_to_blackhole()
680 static int set_proc_descriptor_to_pty(descriptorspec_item *desc, int *master_fd, int *slave_fd) in set_proc_descriptor_to_pty() argument
695 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pty()
696 desc->childend = dup(*slave_fd); in set_proc_descriptor_to_pty()
697 desc->parentend = dup(*master_fd); in set_proc_descriptor_to_pty()
698 desc->mode_flags = O_RDWR; in set_proc_descriptor_to_pty()
719 static int set_proc_descriptor_to_pipe(descriptorspec_item *desc, zend_string *zmode) in set_proc_descriptor_to_pipe() argument
728 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pipe()
731 desc->parentend = newpipe[1]; in set_proc_descriptor_to_pipe()
732 desc->childend = newpipe[0]; in set_proc_descriptor_to_pipe()
733 desc->mode_flags = O_WRONLY; in set_proc_descriptor_to_pipe()
735 desc->parentend = newpipe[0]; in set_proc_descriptor_to_pipe()
736 desc->childend = newpipe[1]; in set_proc_descriptor_to_pipe()
737 desc->mode_flags = O_RDONLY; in set_proc_descriptor_to_pipe()
740 desc->parentend = make_descriptor_cloexec(desc->parentend); in set_proc_descriptor_to_pipe()
744 desc->mode_flags |= O_BINARY; in set_proc_descriptor_to_pipe()
756 static int set_proc_descriptor_to_socket(descriptorspec_item *desc) in set_proc_descriptor_to_socket() argument
767 desc->type = DESCRIPTOR_TYPE_SOCKET; in set_proc_descriptor_to_socket()
768 desc->parentend = make_descriptor_cloexec((php_file_descriptor_t) sock[0]); in set_proc_descriptor_to_socket()
771 desc->childend = (php_file_descriptor_t) sock[1]; in set_proc_descriptor_to_socket()
776 static int set_proc_descriptor_to_file(descriptorspec_item *desc, zend_string *file_path, in set_proc_descriptor_to_file() argument
795 desc->childend = dup_fd_as_handle((int)fd); in set_proc_descriptor_to_file()
801 SetFilePointer(desc->childend, 0, NULL, FILE_END); in set_proc_descriptor_to_file()
804 desc->childend = fd; in set_proc_descriptor_to_file()
829 static int redirect_proc_descriptor(descriptorspec_item *desc, int target, in redirect_proc_descriptor() argument
861 return dup_proc_descriptor(redirect_to, &desc->childend, nindex); in redirect_proc_descriptor()
925 static int set_proc_descriptor_from_resource(zval *resource, descriptorspec_item *desc, int nindex) in set_proc_descriptor_from_resource() argument
945 if (dup_proc_descriptor(fd_t, &desc->childend, nindex) == FAILURE) { in set_proc_descriptor_from_resource()