Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
ksh
ksh93-sigpipe.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ksh93-sigpipe.dif of Package ksh
--- src/cmd/ksh93/sh/fault.c +++ src/cmd/ksh93/sh/fault.c 2010-06-28 14:04:13.858925163 +0000 @@ -418,8 +418,25 @@ void sh_chktrap(void) if(trap=sh.st.trapcom[sig]) { Sfio_t *fp; - if(sig==SIGPIPE && (fp=sfpool((Sfio_t*)0,sh.outpool,SF_WRITE)) && sferror(fp)) - sfclose(fp); + if(sig==SIGPIPE) { + sh.lastsig=SIGPIPE; +#if 0 + if ((fp=sfpool((Sfio_t*)0,sh.outpool,SF_WRITE)) && sferror(fp)) + sfclose(fp); +#else + int fd; + 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); + } +#endif + } sh.oldexit = SH_EXITSIG|sig; sh_trap(trap,0); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor