Skip to content

Commit

Permalink
* sysdeps/posix/spawni.c (__spawni): Use non-cancelable interfaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Jun 4, 2006
1 parent 9009e8f commit 7231452
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2006-06-04 Ulrich Drepper <drepper@redhat.com>

* sysdeps/posix/spawni.c (__spawni): Use non-cancelable interfaces.

* string/Makefile (tests): Add bug-envz1.
* string/bug-enz1.c: New file.

Expand Down
11 changes: 6 additions & 5 deletions sysdeps/posix/spawni.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Guts of POSIX spawn interface. Generic POSIX.1 version.
Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
Copyright (C) 2000-2005, 2006 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
Expand Down Expand Up @@ -177,9 +177,10 @@ __spawni (pid_t *pid, const char *file,

case spawn_do_open:
{
int new_fd = __open64 (action->action.open_action.path,
action->action.open_action.oflag,
action->action.open_action.mode);
int new_fd = open_not_cancel (action->action.open_action.path,
action->action.open_action.oflag
| O_LARGEFILE,
action->action.open_action.mode);

if (new_fd == -1)
/* The `open' call failed. */
Expand All @@ -193,7 +194,7 @@ __spawni (pid_t *pid, const char *file,
/* The `dup2' call failed. */
_exit (SPAWN_ERROR);

if (__close (new_fd) != 0)
if (close_not_cancel (new_fd) != 0)
/* The `close' call failed. */
_exit (SPAWN_ERROR);
}
Expand Down

0 comments on commit 7231452

Please sign in to comment.