Lines Matching refs:desc
729 static zend_result set_proc_descriptor_to_blackhole(descriptorspec_item *desc) in set_proc_descriptor_to_blackhole() argument
732 desc->childend = CreateFileA("nul", GENERIC_READ | GENERIC_WRITE, in set_proc_descriptor_to_blackhole()
734 if (desc->childend == NULL) { in set_proc_descriptor_to_blackhole()
739 desc->childend = open("/dev/null", O_RDWR); in set_proc_descriptor_to_blackhole()
740 if (desc->childend < 0) { in set_proc_descriptor_to_blackhole()
748 static zend_result set_proc_descriptor_to_pty(descriptorspec_item *desc, int *master_fd, int *slave… in set_proc_descriptor_to_pty() argument
763 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pty()
764 desc->childend = dup(*slave_fd); in set_proc_descriptor_to_pty()
765 desc->parentend = dup(*master_fd); in set_proc_descriptor_to_pty()
766 desc->mode_flags = O_RDWR; in set_proc_descriptor_to_pty()
787 static zend_result set_proc_descriptor_to_pipe(descriptorspec_item *desc, zend_string *zmode) in set_proc_descriptor_to_pipe() argument
796 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pipe()
799 desc->parentend = newpipe[1]; in set_proc_descriptor_to_pipe()
800 desc->childend = newpipe[0]; in set_proc_descriptor_to_pipe()
801 desc->mode_flags = O_WRONLY; in set_proc_descriptor_to_pipe()
803 desc->parentend = newpipe[0]; in set_proc_descriptor_to_pipe()
804 desc->childend = newpipe[1]; in set_proc_descriptor_to_pipe()
805 desc->mode_flags = O_RDONLY; in set_proc_descriptor_to_pipe()
808 desc->parentend = make_descriptor_cloexec(desc->parentend); in set_proc_descriptor_to_pipe()
812 desc->mode_flags |= O_BINARY; in set_proc_descriptor_to_pipe()
824 static zend_result set_proc_descriptor_to_socket(descriptorspec_item *desc) in set_proc_descriptor_to_socket() argument
835 desc->type = DESCRIPTOR_TYPE_SOCKET; in set_proc_descriptor_to_socket()
836 desc->parentend = make_descriptor_cloexec((php_file_descriptor_t) sock[0]); in set_proc_descriptor_to_socket()
839 desc->childend = (php_file_descriptor_t) sock[1]; in set_proc_descriptor_to_socket()
844 static zend_result set_proc_descriptor_to_file(descriptorspec_item *desc, zend_string *file_path, in set_proc_descriptor_to_file() argument
863 desc->childend = dup_fd_as_handle((int)fd); in set_proc_descriptor_to_file()
869 SetFilePointer(desc->childend, 0, NULL, FILE_END); in set_proc_descriptor_to_file()
872 desc->childend = fd; in set_proc_descriptor_to_file()
897 static zend_result redirect_proc_descriptor(descriptorspec_item *desc, int target, in redirect_proc_descriptor() argument
929 return dup_proc_descriptor(redirect_to, &desc->childend, nindex); in redirect_proc_descriptor()
994 static zend_result set_proc_descriptor_from_resource(zval *resource, descriptorspec_item *desc, int… in set_proc_descriptor_from_resource() argument
1014 return dup_proc_descriptor(fd_t, &desc->childend, nindex); in set_proc_descriptor_from_resource()