ksh/ksh93-fdleak.dif
2010-10-21 10:37:38 +00:00

11 lines
289 B
Plaintext

--- src/cmd/ksh93/edit/history.c
+++ src/cmd/ksh93/edit/history.c 2010-10-21 10:35:05.567927921 +0000
@@ -394,6 +394,7 @@ retry:
}
if(fd>=0)
{
+ fcntl(fd,F_SETFD,FD_CLOEXEC);
hp->tty = strdup(ttyname(2));
hp->auditfp = sfnew((Sfio_t*)0,NULL,-1,fd,SF_WRITE);
}