Dr. Werner Fink 2009-08-24 14:23:50 +00:00 committed by Git OBS Bridge
parent e529961e6c
commit 22d7136c9d
3 changed files with 26 additions and 1 deletions

View File

@ -54,6 +54,7 @@ Patch12: ksh93-limits.dif
Patch14: ksh93-ia64.dif
Patch15: ksh93-s390.dif
Patch16: ksh93-memleak.dif
Patch17: ksh93-pipe.dif
Patch42: ksh93-debugleaks.dif
%global use_suid_exe 0
%global use_locale 0
@ -121,6 +122,7 @@ find share/ -type d -a -empty | xargs -r rm -vrf
%endif
%patch15
%patch16
%patch17
%if %debug_memleak
%patch42
%endif

23
ksh93-pipe.dif Normal file
View File

@ -0,0 +1,23 @@
--- src/cmd/ksh93/sh/fault.c
+++ src/cmd/ksh93/sh/fault.c 2009-08-24 15:52:21.770401660 +0200
@@ -413,6 +413,20 @@ void sh_chktrap(void)
sh.sigflag[sig] &= ~SH_SIGTRAP;
if(trap=sh.st.trapcom[sig])
{
+ if (sig==SIGPIPE) {
+ int fd;
+ sh.lastsig=SIGPIPE;
+ for(fd = 0; fd < sh.lim.open_max; fd++)
+ {
+ if (sh.fdstatus[fd] == IOCLOSE)
+ continue;
+ if ((sh.fdstatus[fd]&IOWRITE) == 0)
+ continue;
+ if (sferror(sh.sftable[fd]) == 0)
+ continue;
+ sh_close(fd);
+ }
+ }
sh.oldexit = SH_EXITSIG|sig;
sh_trap(trap,0);
}

View File

@ -43,4 +43,4 @@ do
done
echo "[${0##*/}: leak count at $leak]"
((leak < 7)) || exit 1
((leak < 8)) || exit 1