From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3712 invoked from network); 4 May 2000 13:34:16 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 May 2000 13:34:16 -0000 Received: (qmail 355 invoked by alias); 4 May 2000 13:34:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11151 Received: (qmail 308 invoked from network); 4 May 2000 13:34:07 -0000 Date: Thu, 4 May 2000 15:34:06 +0200 (MET DST) Message-Id: <200005041334.PAA08733@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Thu, 4 May 2000 14:55:13 +0400 Subject: RE: PATCH: Re: zpty and controlling tty (and other fd's) 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@informatik.hu-berlin.de