Lines Matching refs:desc
827 static zend_result set_proc_descriptor_to_blackhole(descriptorspec_item *desc) in set_proc_descriptor_to_blackhole() argument
830 desc->childend = CreateFileA("nul", GENERIC_READ | GENERIC_WRITE, in set_proc_descriptor_to_blackhole()
832 if (desc->childend == NULL) { in set_proc_descriptor_to_blackhole()
837 desc->childend = open("/dev/null", O_RDWR); in set_proc_descriptor_to_blackhole()
838 if (desc->childend < 0) { in set_proc_descriptor_to_blackhole()
846 static zend_result set_proc_descriptor_to_pty(descriptorspec_item *desc, int *master_fd, int *slave… in set_proc_descriptor_to_pty() argument
861 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pty()
862 desc->childend = dup(*slave_fd); in set_proc_descriptor_to_pty()
863 desc->parentend = dup(*master_fd); in set_proc_descriptor_to_pty()
864 desc->mode_flags = O_RDWR; in set_proc_descriptor_to_pty()
885 static zend_result set_proc_descriptor_to_pipe(descriptorspec_item *desc, zend_string *zmode) in set_proc_descriptor_to_pipe() argument
894 desc->type = DESCRIPTOR_TYPE_PIPE; in set_proc_descriptor_to_pipe()
897 desc->parentend = newpipe[1]; in set_proc_descriptor_to_pipe()
898 desc->childend = newpipe[0]; in set_proc_descriptor_to_pipe()
899 desc->mode_flags = O_WRONLY; in set_proc_descriptor_to_pipe()
901 desc->parentend = newpipe[0]; in set_proc_descriptor_to_pipe()
902 desc->childend = newpipe[1]; in set_proc_descriptor_to_pipe()
903 desc->mode_flags = O_RDONLY; in set_proc_descriptor_to_pipe()
906 desc->parentend = make_descriptor_cloexec(desc->parentend); in set_proc_descriptor_to_pipe()
910 desc->mode_flags |= O_BINARY; in set_proc_descriptor_to_pipe()
922 static zend_result set_proc_descriptor_to_socket(descriptorspec_item *desc) in set_proc_descriptor_to_socket() argument
933 desc->type = DESCRIPTOR_TYPE_SOCKET; in set_proc_descriptor_to_socket()
934 desc->parentend = make_descriptor_cloexec((php_file_descriptor_t) sock[0]); in set_proc_descriptor_to_socket()
937 desc->childend = (php_file_descriptor_t) sock[1]; in set_proc_descriptor_to_socket()
942 static zend_result set_proc_descriptor_to_file(descriptorspec_item *desc, zend_string *file_path, in set_proc_descriptor_to_file() argument
961 desc->childend = dup_fd_as_handle((int)fd); in set_proc_descriptor_to_file()
967 SetFilePointer(desc->childend, 0, NULL, FILE_END); in set_proc_descriptor_to_file()
970 desc->childend = fd; in set_proc_descriptor_to_file()
995 static zend_result redirect_proc_descriptor(descriptorspec_item *desc, int target, in redirect_proc_descriptor() argument
1027 return dup_proc_descriptor(redirect_to, &desc->childend, nindex); in redirect_proc_descriptor()
1092 static zend_result set_proc_descriptor_from_resource(zval *resource, descriptorspec_item *desc, int… in set_proc_descriptor_from_resource() argument
1112 return dup_proc_descriptor(fd_t, &desc->childend, nindex); in set_proc_descriptor_from_resource()