aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-05 20:24:50 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-05 20:24:50 -0400
commitd96de9634a334af16c0ac711074c15ac1762b23c (patch)
tree78f566d420a800c92347a7b994d8850a644f1b61 /sysdeps/mach
parent54b1f8b6bf88e34c55b77b2e4acb00776b4a5783 (diff)
downloadglibc-d96de9634a334af16c0ac711074c15ac1762b23c.tar
glibc-d96de9634a334af16c0ac711074c15ac1762b23c.tar.gz
glibc-d96de9634a334af16c0ac711074c15ac1762b23c.tar.bz2
glibc-d96de9634a334af16c0ac711074c15ac1762b23c.zip
Try shell in posix_spawn* only in compat mode
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/spawni.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c
index 244ca2d6e1..3d2b5915b2 100644
--- a/sysdeps/mach/hurd/spawni.c
+++ b/sysdeps/mach/hurd/spawni.c
@@ -1,5 +1,5 @@
/* spawn a new process running an executable. Hurd version.
- Copyright (C) 2001,02,04 Free Software Foundation, Inc.
+ Copyright (C) 2001,02,04,11 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ __spawni (pid_t *pid, const char *file,
const posix_spawn_file_actions_t *file_actions,
const posix_spawnattr_t *attrp,
char *const argv[], char *const envp[],
- int use_path)
+ int xflags)
{
pid_t new_pid;
char *path, *p, *name;
@@ -391,7 +391,7 @@ __spawni (pid_t *pid, const char *file,
/* Make sure the dtable can hold NEWFD. */
#define EXPAND_DTABLE(newfd) \
- ({ \
+ ({ \
if ((unsigned int)newfd >= dtablesize \
&& newfd < _hurd_rlimits[RLIMIT_OFILE].rlim_cur) \
{ \
@@ -399,7 +399,7 @@ __spawni (pid_t *pid, const char *file,
NEW_TABLE (dtable, newfd); \
NEW_TABLE (ulink_dtable, newfd); \
NEW_TABLE (dtable_cells, newfd); \
- dtablesize = newfd + 1; \
+ dtablesize = newfd + 1; \
} \
((unsigned int)newfd < dtablesize ? 0 : EMFILE); \
})
@@ -543,7 +543,7 @@ __spawni (pid_t *pid, const char *file,
conditions are diagnosed first and what side effects (file creation,
etc) can be observed before what errors. */
- if (! use_path || strchr (file, '/') != NULL)
+ if ((xflags & SPAWN_XFLAGS_USE_PATH) == 0 || strchr (file, '/') != NULL)
/* The FILE parameter is actually a path. */
err = child_lookup (file, O_EXEC, 0, &execfile);
else