/* Guts of POSIX spawn interface. Generic POSIX.1 version.
- Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
int
__spawni (pid_t *pid, const char *file,
const posix_spawn_file_actions_t *file_actions,
action->action.open_action.mode);
if (new_fd == -1)
- /* The `open' call failed. */
+ /* The 'open' call failed. */
_exit (SPAWN_ERROR);
/* Make sure the desired file descriptor is used. */
{
if (dup2 (new_fd, action->action.open_action.fd)
!= action->action.open_action.fd)
- /* The `dup2' call failed. */
+ /* The 'dup2' call failed. */
_exit (SPAWN_ERROR);
if (close_not_cancel (new_fd) != 0)
- /* The `close' call failed. */
+ /* The 'close' call failed. */
_exit (SPAWN_ERROR);
}
}
if (dup2 (action->action.dup2_action.fd,
action->action.dup2_action.newfd)
!= action->action.dup2_action.newfd)
- /* The `dup2' call failed. */
+ /* The 'dup2' call failed. */
_exit (SPAWN_ERROR);
break;
}
if (errno == ENOEXEC)
script_execute (file, argv, envp);
- /* Oh, oh. `execve' returns. This is bad. */
+ /* Oh, oh. 'execve' returns. This is bad. */
_exit (SPAWN_ERROR);
}
if (path == NULL)
{
#if HAVE_CONFSTR
- /* There is no `PATH' in the environment.
+ /* There is no 'PATH' in the environment.
The default search path is the current directory
- followed by the path `confstr' returns for `_CS_PATH'. */
+ followed by the path 'confstr' returns for '_CS_PATH'. */
len = confstr (_CS_PATH, (char *) NULL, 0);
path = (char *) alloca (1 + len);
path[0] = ':';
if (p == path)
/* Two adjacent colons, or a colon at the beginning or the end
- of `PATH' means to search the current directory. */
+ of 'PATH' means to search the current directory. */
startp = name + 1;
else
startp = (char *) memcpy (name - (p - path), path, p - path);