commit bash-20041007 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:37:49 -05:00
parent 7a2f2783f4
commit cac4cdbf5e
26 changed files with 2215 additions and 177 deletions
+15
View File
@@ -970,6 +970,21 @@ add_undo_redirect (fd)
is thrown away by the `exec' builtin. */
add_exec_redirect (dummy_redirect);
/* experimental: if we're saving a redirection to undo for a file descriptor
above SHELL_FD_BASE, add a redirection to be undone if the exec builtin
causes redirections to be discarded. */
if (fd >= SHELL_FD_BASE)
{
rd.dest = new_fd;
new_redirect = make_redirection (fd, r_duplicating_output, rd);
#if 0
closer = copy_redirects (new_redirect);
add_exec_redirect (closer);
#else
add_exec_redirect (new_redirect);
#endif
}
/* File descriptors used only for saving others should always be
marked close-on-exec. Unfortunately, we have to preserve the
close-on-exec state of the file descriptor we are saving, since