inh_handles 117 maint/gnulib/lib/spawni.c grow_inheritable_handles (struct inheritable_handles *inh_handles, int newfd) inh_handles 119 maint/gnulib/lib/spawni.c if (inh_handles->allocated <= newfd) inh_handles 121 maint/gnulib/lib/spawni.c size_t new_allocated = 2 * inh_handles->allocated + 1; inh_handles 126 maint/gnulib/lib/spawni.c realloc (inh_handles->handles, new_allocated * sizeof (HANDLE)); inh_handles 134 maint/gnulib/lib/spawni.c realloc (inh_handles->flags, new_allocated * sizeof (unsigned char)); inh_handles 141 maint/gnulib/lib/spawni.c inh_handles->allocated = new_allocated; inh_handles 142 maint/gnulib/lib/spawni.c inh_handles->handles = new_handles_array; inh_handles 143 maint/gnulib/lib/spawni.c inh_handles->flags = new_flags_array; inh_handles 146 maint/gnulib/lib/spawni.c HANDLE *handles = inh_handles->handles; inh_handles 148 maint/gnulib/lib/spawni.c for (; inh_handles->count <= newfd; inh_handles->count++) inh_handles 149 maint/gnulib/lib/spawni.c handles[inh_handles->count] = INVALID_HANDLE_VALUE; inh_handles 156 maint/gnulib/lib/spawni.c shrink_inheritable_handles (struct inheritable_handles *inh_handles) inh_handles 158 maint/gnulib/lib/spawni.c HANDLE *handles = inh_handles->handles; inh_handles 160 maint/gnulib/lib/spawni.c while (inh_handles->count > 3 inh_handles 161 maint/gnulib/lib/spawni.c && handles[inh_handles->count - 1] == INVALID_HANDLE_VALUE) inh_handles 162 maint/gnulib/lib/spawni.c inh_handles->count--; inh_handles 167 maint/gnulib/lib/spawni.c close_inheritable_handles (struct inheritable_handles *inh_handles) inh_handles 169 maint/gnulib/lib/spawni.c HANDLE *handles = inh_handles->handles; inh_handles 170 maint/gnulib/lib/spawni.c size_t handles_count = inh_handles->count; inh_handles 364 maint/gnulib/lib/spawni.c do_open (struct inheritable_handles *inh_handles, int newfd, inh_handles 373 maint/gnulib/lib/spawni.c if (grow_inheritable_handles (inh_handles, newfd) < 0) inh_handles 375 maint/gnulib/lib/spawni.c if (inh_handles->handles[newfd] != INVALID_HANDLE_VALUE inh_handles 376 maint/gnulib/lib/spawni.c && !CloseHandle (inh_handles->handles[newfd])) inh_handles 407 maint/gnulib/lib/spawni.c curr_process, &inh_handles->handles[newfd], inh_handles 414 maint/gnulib/lib/spawni.c inh_handles->flags[newfd] = ((flags & O_APPEND) != 0 ? 32 : 0); inh_handles 422 maint/gnulib/lib/spawni.c do_dup2 (struct inheritable_handles *inh_handles, int oldfd, int newfd, inh_handles 425 maint/gnulib/lib/spawni.c if (!(oldfd >= 0 && oldfd < inh_handles->count inh_handles 426 maint/gnulib/lib/spawni.c && inh_handles->handles[oldfd] != INVALID_HANDLE_VALUE)) inh_handles 438 maint/gnulib/lib/spawni.c if (grow_inheritable_handles (inh_handles, newfd) < 0) inh_handles 440 maint/gnulib/lib/spawni.c if (inh_handles->handles[newfd] != INVALID_HANDLE_VALUE inh_handles 441 maint/gnulib/lib/spawni.c && !CloseHandle (inh_handles->handles[newfd])) inh_handles 448 maint/gnulib/lib/spawni.c if (!DuplicateHandle (curr_process, inh_handles->handles[oldfd], inh_handles 449 maint/gnulib/lib/spawni.c curr_process, &inh_handles->handles[newfd], inh_handles 455 maint/gnulib/lib/spawni.c inh_handles->flags[newfd] = 0; inh_handles 464 maint/gnulib/lib/spawni.c do_close (struct inheritable_handles *inh_handles, int fd) inh_handles 466 maint/gnulib/lib/spawni.c if (!(fd >= 0 && fd < inh_handles->count inh_handles 467 maint/gnulib/lib/spawni.c && inh_handles->handles[fd] != INVALID_HANDLE_VALUE)) inh_handles 472 maint/gnulib/lib/spawni.c if (!CloseHandle (inh_handles->handles[fd])) inh_handles 477 maint/gnulib/lib/spawni.c inh_handles->handles[fd] = INVALID_HANDLE_VALUE; inh_handles 553 maint/gnulib/lib/spawni.c struct inheritable_handles inh_handles; inh_handles 554 maint/gnulib/lib/spawni.c if (init_inheritable_handles (&inh_handles, true) < 0) inh_handles 576 maint/gnulib/lib/spawni.c if (do_close (&inh_handles, fd) < 0) inh_handles 587 maint/gnulib/lib/spawni.c if (do_open (&inh_handles, newfd, filename, directory, inh_handles 598 maint/gnulib/lib/spawni.c if (do_dup2 (&inh_handles, oldfd, newfd, curr_process) < 0) inh_handles 628 maint/gnulib/lib/spawni.c shrink_inheritable_handles (&inh_handles); inh_handles 639 maint/gnulib/lib/spawni.c if (compose_handles_block (&inh_handles, &sinfo) < 0) inh_handles 664 maint/gnulib/lib/spawni.c close_inheritable_handles (&inh_handles); inh_handles 665 maint/gnulib/lib/spawni.c free_inheritable_handles (&inh_handles); inh_handles 678 maint/gnulib/lib/spawni.c close_inheritable_handles (&inh_handles); inh_handles 679 maint/gnulib/lib/spawni.c free_inheritable_handles (&inh_handles); inh_handles 692 maint/gnulib/lib/spawni.c close_inheritable_handles (&inh_handles); inh_handles 693 maint/gnulib/lib/spawni.c free_inheritable_handles (&inh_handles); inh_handles 703 maint/gnulib/lib/spawni.c close_inheritable_handles (&inh_handles); inh_handles 704 maint/gnulib/lib/spawni.c free_inheritable_handles (&inh_handles); inh_handles 307 maint/gnulib/lib/windows-spawn.c init_inheritable_handles (struct inheritable_handles *inh_handles, inh_handles 407 maint/gnulib/lib/windows-spawn.c inh_handles->count = handles_count; inh_handles 408 maint/gnulib/lib/windows-spawn.c inh_handles->allocated = handles_allocated; inh_handles 409 maint/gnulib/lib/windows-spawn.c inh_handles->handles = handles_array; inh_handles 410 maint/gnulib/lib/windows-spawn.c inh_handles->flags = flags_array; inh_handles 415 maint/gnulib/lib/windows-spawn.c compose_handles_block (const struct inheritable_handles *inh_handles, inh_handles 421 maint/gnulib/lib/windows-spawn.c sinfo->hStdInput = inh_handles->handles[0]; inh_handles 422 maint/gnulib/lib/windows-spawn.c sinfo->hStdOutput = inh_handles->handles[1]; inh_handles 423 maint/gnulib/lib/windows-spawn.c sinfo->hStdError = inh_handles->handles[2]; inh_handles 446 maint/gnulib/lib/windows-spawn.c size_t handles_count = inh_handles->count; inh_handles 474 maint/gnulib/lib/windows-spawn.c HANDLE handle = inh_handles->handles[fd]; inh_handles 478 maint/gnulib/lib/windows-spawn.c && (fd >= 3 || inh_handles->flags[fd] != 0)) inh_handles 493 maint/gnulib/lib/windows-spawn.c flags[fd] = 1 | inh_handles->flags[fd]; inh_handles 523 maint/gnulib/lib/windows-spawn.c free_inheritable_handles (struct inheritable_handles *inh_handles) inh_handles 525 maint/gnulib/lib/windows-spawn.c free (inh_handles->flags); inh_handles 526 maint/gnulib/lib/windows-spawn.c free (inh_handles->handles); inh_handles 610 maint/gnulib/lib/windows-spawn.c struct inheritable_handles inh_handles; inh_handles 611 maint/gnulib/lib/windows-spawn.c if (init_inheritable_handles (&inh_handles, false) < 0) inh_handles 622 maint/gnulib/lib/windows-spawn.c inh_handles.handles[0] = stdin_handle; inh_handles.flags[0] = 0; inh_handles 623 maint/gnulib/lib/windows-spawn.c inh_handles.handles[1] = stdout_handle; inh_handles.flags[1] = 0; inh_handles 624 maint/gnulib/lib/windows-spawn.c inh_handles.handles[2] = stderr_handle; inh_handles.flags[2] = 0; inh_handles 637 maint/gnulib/lib/windows-spawn.c if (compose_handles_block (&inh_handles, &sinfo) < 0) inh_handles 640 maint/gnulib/lib/windows-spawn.c free_inheritable_handles (&inh_handles); inh_handles 658 maint/gnulib/lib/windows-spawn.c free_inheritable_handles (&inh_handles); inh_handles 672 maint/gnulib/lib/windows-spawn.c free_inheritable_handles (&inh_handles); inh_handles 115 maint/gnulib/lib/windows-spawn.h extern int init_inheritable_handles (struct inheritable_handles *inh_handles, inh_handles 121 maint/gnulib/lib/windows-spawn.h extern int compose_handles_block (const struct inheritable_handles *inh_handles, inh_handles 125 maint/gnulib/lib/windows-spawn.h extern void free_inheritable_handles (struct inheritable_handles *inh_handles);