[PATCH 1/2] Fix typo in posix_spawn_file_actions_addclose() implementation
Jonathan Nieder
jrnieder@gmail.com
Fri Aug 27 14:11:00 GMT 2010
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
More information about the Libc-alpha
mailing list