Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: Re: zpty and controlling tty (and other fd's)
- X-seq: zsh-workers 11151
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: RE: PATCH: Re: zpty and controlling tty (and other fd's)
- Date: Thu, 4 May 2000 15:34:06 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Thu, 4 May 2000 14:55:13 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Ahem.
Bye
Sven
Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.6
diff -u -r1.6 exec.c
--- Src/exec.c 2000/05/02 13:08:19 1.6
+++ Src/exec.c 2000/05/04 13:30:01
@@ -356,6 +356,7 @@
if (!*eep)
eep[1] = NULL;
*eep = buf;
+ closedumps();
execve(pth, argv, environ);
/* If the execve returns (which in general shouldn't happen), *
Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.6
diff -u -r1.6 parse.c
--- Src/parse.c 2000/04/12 13:06:18 1.6
+++ Src/parse.c 2000/05/04 13:30:03
@@ -3030,6 +3030,16 @@
}
}
+/**/
+mod_export void
+closedumps(void)
+{
+ FuncDump p;
+
+ for (p = dumps; p; p = p->next)
+ zclose(p->fd);
+}
+
#else
void
@@ -3042,6 +3052,11 @@
{
}
+void
+closedumps(void)
+{
+}
+
#endif
/**/
@@ -3070,3 +3085,4 @@
}
return ret;
}
+
Index: Src/Modules/zpty.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zpty.c,v
retrieving revision 1.4
diff -u -r1.4 zpty.c
--- Src/Modules/zpty.c 2000/05/04 09:53:42 1.4
+++ Src/Modules/zpty.c 2000/05/04 13:30:03
@@ -356,6 +356,8 @@
if (SHTTY != -1)
close(SHTTY);
+ closedumps();
+
execve(cmd, args, environ);
exit(0);
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author