Dr. Werner Fink 2012-12-20 14:03:59 +00:00 committed by Git OBS Bridge
parent efcc79ddda
commit 19b36d8eab
4 changed files with 70 additions and 3 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Dec 20 12:48:02 UTC 2012 - werner@suse.de
- Add ksh93-dttree-crash.dif - Allow empty strings in (dt)trees
(bnc#795324)
- Modify ksh93-jobs.dif - make sure that tty is closed even if an
interrupt has been happen at close and also be aware that the
return value of tcgetpgrp() is greater than `1' that does not
match the process group ID of any existing process group (bnc#790315)
-------------------------------------------------------------------
Fri Oct 26 15:05:09 UTC 2012 - coolo@suse.com

View File

@ -114,6 +114,7 @@ Patch27: astksh_builtin_poll20120806_001.diff
Patch28: ksh93-env.dif
Patch29: ksh93-zerofill.dif
Patch30: ksh93-pathtemp.dif
Patch31: ksh93-dttree-crash.dif
Patch42: ksh-locale.patch
%description
@ -200,6 +201,7 @@ fi
%patch28
%patch29
%patch30
%patch31
%build
#

11
ksh93-dttree-crash.dif Normal file
View File

@ -0,0 +1,11 @@
--- src/lib/libast/include/cdt.h
+++ src/lib/libast/include/cdt.h 2012-12-20 11:37:28.641452879 +0000
@@ -313,7 +313,7 @@ _END_EXTERNS_
#define _DTCMP(dt,k1,k2,dc) \
((dc)->comparf ? (*(dc)->comparf)((dt), (k1), (k2), (dc)) : \
(dc)->size > 0 ? memcmp((Void_t*)(k1), ((Void_t*)k2), (dc)->size) : \
- strcmp((char*)(k1), ((char*)k2)) )
+ strcmp((char*)(k1), ((char*)(k2 ? k2 : ""))) )
#define _DTHSH(dt,ky,dc) ((dc)->hashf ? (*(dc)->hashf)((dt), (ky), (dc)) : \
dtstrhash(0, (ky), (dc)->size) )

View File

@ -1,6 +1,42 @@
--- src/cmd/ksh93/sh/jobs.c
+++ src/cmd/ksh93/sh/jobs.c 2011-08-15 18:43:23.005726321 +0200
@@ -1103,7 +1103,7 @@ static struct process *job_bystring(regi
+++ src/cmd/ksh93/sh/jobs.c 2012-12-20 13:33:27.885452491 +0000
@@ -638,12 +638,14 @@ void job_init(Shell_t *shp, int lflag)
/* This should have already been done by rlogin */
register int fd;
register char *ttynam;
+ int err = errno;
#ifndef SIGTSTP
setpgid(0,shp->gd->pid);
#endif /*SIGTSTP */
if(job.mypgid<0 || !(ttynam=ttyname(JOBTTY)))
return;
- close(JOBTTY);
+ while(close(JOBTTY)<0 && errno==EINTR)
+ errno = err;
if((fd = open(ttynam,O_RDWR)) <0)
return;
if(fd!=JOBTTY)
@@ -660,7 +662,7 @@ void job_init(Shell_t *shp, int lflag)
/* wait until we are in the foreground */
while((job.mytgid=tcgetpgrp(JOBTTY)) != job.mypgid)
{
- if(job.mytgid == -1)
+ if(job.mytgid <= 0)
return;
/* Stop this shell until continued */
signal(SIGTTIN,SIG_DFL);
@@ -833,7 +835,9 @@ static void job_set(register struct proc
if((pw->p_flag&P_STOPPED) || tcgetpgrp(job.fd) == shp->gd->pid)
tcsetpgrp(job.fd,pw->p_fgrp);
/* if job is stopped, resume it in the background */
- job_unstop(pw);
+ if(!shp->forked)
+ job_unstop(pw);
+ shp->forked = 0;
#endif /* SIGTSTP */
}
@@ -1104,7 +1110,7 @@ static struct process *job_bystring(regi
int job_kill(register struct process *pw,register int sig)
{
@ -9,7 +45,7 @@
register pid_t pid;
register int r;
const char *msg;
@@ -1116,6 +1116,7 @@ int job_kill(register struct process *pw
@@ -1117,6 +1123,7 @@ int job_kill(register struct process *pw
errno = ECHILD;
if(pw==0)
goto error;
@ -17,3 +53,11 @@
pid = pw->p_pid;
#if SHOPT_COSHELL
if(pw->p_cojob)
@@ -2043,6 +2050,7 @@ void job_fork(pid_t parent)
job.in_critical = 0;
break;
default:
+ job_chksave(parent);
jobfork=0;
job_unlock();
break;