mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-11 04:30:44 +02:00
commit bash-20041007 snapshot
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user