do not crash, when disk is full, report an error (#1212994)
This commit is contained in:
parent
52585b50c0
commit
2249c87fa4
20
ksh-20120801-diskfull.patch
Normal file
20
ksh-20120801-diskfull.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- ksh-20120801/src/cmd/ksh93/sh/main.c 2015-04-17 16:55:57.802048900 -0300
|
||||||
|
+++ ksh-20120801/src/cmd/ksh93/sh/main.c 2015-04-17 17:10:45.276129709 -0300
|
||||||
|
@@ -423,7 +423,7 @@ static void exfile(register Shell_t *shp
|
||||||
|
sfsync(shp->outpool);
|
||||||
|
shp->st.execbrk = shp->st.breakcnt = 0;
|
||||||
|
/* check for return from profile or env file */
|
||||||
|
- if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT))
|
||||||
|
+ if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT || jmpval==SH_JMPERREXIT))
|
||||||
|
{
|
||||||
|
sh_setstate(states);
|
||||||
|
goto done;
|
||||||
|
@@ -600,6 +600,8 @@ done:
|
||||||
|
siglongjmp(*shp->jmplist,jmpval);
|
||||||
|
else if(jmpval == SH_JMPEXIT)
|
||||||
|
sh_done(shp,0);
|
||||||
|
+ else if(jmpval == SH_JMPERREXIT)
|
||||||
|
+ sh_done(shp,-1);
|
||||||
|
if(fno>0)
|
||||||
|
sh_close(fno);
|
||||||
|
if(shp->st.filename)
|
7
ksh.spec
7
ksh.spec
@ -9,7 +9,7 @@ Group: System Environment/Shells
|
|||||||
#CPL everywhere else (for KSH itself)
|
#CPL everywhere else (for KSH itself)
|
||||||
License: CPL
|
License: CPL
|
||||||
Version: %{releasedate}
|
Version: %{releasedate}
|
||||||
Release: 25%{?dist}
|
Release: 26%{?dist}
|
||||||
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
|
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
|
||||||
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
|
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
|
||||||
Source2: kshcomp.conf
|
Source2: kshcomp.conf
|
||||||
@ -150,6 +150,7 @@ Patch60: ksh-20120801-trapcom.patch
|
|||||||
# for ksh <= 2013-04-09, rhbz#960371
|
# for ksh <= 2013-04-09, rhbz#960371
|
||||||
Patch61: ksh-20120801-lexfix.patch
|
Patch61: ksh-20120801-lexfix.patch
|
||||||
Patch62: ksh-20140801-arraylen.patch
|
Patch62: ksh-20140801-arraylen.patch
|
||||||
|
Patch63: ksh-20120801-diskfull.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Conflicts: pdksh
|
Conflicts: pdksh
|
||||||
@ -217,6 +218,7 @@ with "sh" (the Bourne Shell).
|
|||||||
%patch60 -p1 -b .trapcom
|
%patch60 -p1 -b .trapcom
|
||||||
%patch61 -p1 -b .lexfix
|
%patch61 -p1 -b .lexfix
|
||||||
%patch62 -p1 -b .arraylen
|
%patch62 -p1 -b .arraylen
|
||||||
|
%patch63 -p1 -b .diskfull
|
||||||
|
|
||||||
#/dev/fd test does not work because of mock
|
#/dev/fd test does not work because of mock
|
||||||
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
|
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
|
||||||
@ -320,6 +322,9 @@ fi
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 06 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-26
|
||||||
|
- do not crash, when disk is full, report an error (#1212994)
|
||||||
|
|
||||||
* Tue Apr 07 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-25
|
* Tue Apr 07 2015 Michal Hlavinka <mhlavink@redhat.com> - 20120801-25
|
||||||
- using trap DEBUG could cause segmentation fault
|
- using trap DEBUG could cause segmentation fault
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user