mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Fix ksh hanging in pipes
Under certain conditions, ksh scripts may hang when piped through a program that terminates before EOF. Discussion and reproducer: https://bugzilla.redhat.com/show_bug.cgi?id=1457990 https://www.mail-archive.com/ast-developers@lists.research.att.com/msg01961.html src/cmd/ksh93/sh/jobs.c: - In job_wait(), correctly set the terminal foreground process group when resuming a process. (cherry picked from commit 99ef2ca5309da91fdead74bea00743960d470c6a)
This commit is contained in:
		
							parent
							
								
									98c1e37d86
								
							
						
					
					
						commit
						7559f83eff
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1578,6 +1578,7 @@ int	job_wait(register pid_t pid)
 | 
			
		|||
					if( pw->p_exit!=SIGTTIN && pw->p_exit!=SIGTTOU)
 | 
			
		||||
						break;
 | 
			
		||||
 | 
			
		||||
					tcsetpgrp(JOBTTY,pw->p_pgrp);
 | 
			
		||||
					killpg(pw->p_pgrp,SIGCONT);
 | 
			
		||||
				}
 | 
			
		||||
				else /* ignore stop when non-interactive */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue