Lines Matching refs:desc
772 static zend_result set_proc_descriptor_to_blackhole(descriptorspec_item *desc) in set_proc_descriptor_to_blackhole() argument
775 desc->childend = CreateFileA("nul", GENERIC_READ | GENERIC_WRITE, in set_proc_descriptor_to_blackhole()
777 if (desc->childend == NULL) { in set_proc_descriptor_to_blackhole()
782 desc->childend = open("/dev/null", O_RDWR); in set_proc_descriptor_to_blackhole()
783 if (desc->childend < 0) { in set_proc_descriptor_to_blackhole()
791 static zend_result set_proc_descriptor_to_pty(descriptorspec_item *desc, int *master_fd, int *slave… in set_proc_descriptor_to_pty() argument
806 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pty()
807 desc->childend = dup(*slave_fd); in set_proc_descriptor_to_pty()
808 desc->parentend = dup(*master_fd); in set_proc_descriptor_to_pty()
809 desc->mode_flags = O_RDWR; in set_proc_descriptor_to_pty()
830 static zend_result set_proc_descriptor_to_pipe(descriptorspec_item *desc, zend_string *zmode) in set_proc_descriptor_to_pipe() argument
839 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pipe()
842 desc->parentend = newpipe[1]; in set_proc_descriptor_to_pipe()
843 desc->childend = newpipe[0]; in set_proc_descriptor_to_pipe()
844 desc->mode_flags = O_WRONLY; in set_proc_descriptor_to_pipe()
846 desc->parentend = newpipe[0]; in set_proc_descriptor_to_pipe()
847 desc->childend = newpipe[1]; in set_proc_descriptor_to_pipe()
848 desc->mode_flags = O_RDONLY; in set_proc_descriptor_to_pipe()
851 desc->parentend = make_descriptor_cloexec(desc->parentend); in set_proc_descriptor_to_pipe()
855 desc->mode_flags |= O_BINARY; in set_proc_descriptor_to_pipe()
867 static zend_result set_proc_descriptor_to_socket(descriptorspec_item *desc) in set_proc_descriptor_to_socket() argument
878 desc->type = DESCRIPTOR_TYPE_SOCKET; in set_proc_descriptor_to_socket()
879 desc->parentend = make_descriptor_cloexec((php_file_descriptor_t) sock[0]); in set_proc_descriptor_to_socket()
882 desc->childend = (php_file_descriptor_t) sock[1]; in set_proc_descriptor_to_socket()
887 static zend_result set_proc_descriptor_to_file(descriptorspec_item *desc, zend_string *file_path, in set_proc_descriptor_to_file() argument
906 desc->childend = dup_fd_as_handle((int)fd); in set_proc_descriptor_to_file()
912 SetFilePointer(desc->childend, 0, NULL, FILE_END); in set_proc_descriptor_to_file()
915 desc->childend = fd; in set_proc_descriptor_to_file()
940 static zend_result redirect_proc_descriptor(descriptorspec_item *desc, int target, in redirect_proc_descriptor() argument
972 return dup_proc_descriptor(redirect_to, &desc->childend, nindex); in redirect_proc_descriptor()
1037 static zend_result set_proc_descriptor_from_resource(zval *resource, descriptorspec_item *desc, int… in set_proc_descriptor_from_resource() argument
1057 return dup_proc_descriptor(fd_t, &desc->childend, nindex); in set_proc_descriptor_from_resource()