This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2] Fix typo in posix_spawn_file_actions_addclose()implementation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]