This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/2] Fix typo in posix_spawn_file_actions_addclose()implementation
- From: Jonathan Nieder <jrnieder at gmail dot com>
- To: Eric Blake <eblake at redhat dot com>
- Cc: austin-group-futures-l at opengroup dot org, libc-alpha at sourceware dot org
- Date: Fri, 27 Aug 2010 01:37:09 -0500
- Subject: [PATCH 1/2] Fix typo in posix_spawn_file_actions_addclose()implementation
- References: <alpine.LFD.2.00.1008241029530.1046@i5.linux-foundation.org><20100825013625.GC10423@burratino><4C74BFA7.1090907@viscovery.net><4C752739.3010808@redhat.com><20100826061815.GH9708@burratino><4C767682.7030700@redhat.com><20100827063546.GB32454@burratino>
The close action should use the close_action member of the action
union, not open_action. In practice it doesn't matter because
both put the fd at the beginning.
---
posix/spawn_faction_addclose.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/posix/spawn_faction_addclose.c b/posix/spawn_faction_addclose.c
index cb2b9b4..69ce917 100644
--- a/posix/spawn_faction_addclose.c
+++ b/posix/spawn_faction_addclose.c
@@ -44,7 +44,7 @@ posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *file_actions,
/* Add the new value. */
rec = &file_actions->__actions[file_actions->__used];
rec->tag = spawn_do_close;
- rec->action.open_action.fd = fd;
+ rec->action.close_action.fd = fd;
/* Account for the new entry. */
++file_actions->__used;
--
1.7.2.2