mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	command -x: fix 'arg list too long' on Linux (re: 66e1d446)
				
					
				
			I got one intermittent regression test failure due to 'argument list too long' on a Debian x86_64 system. src/cmd/ksh93/sh/path.c: path_xargs(): - Leave extra argument space for systems that need extra bytes: 1KiB per extra byte, with a minimum of 2KiB (the old value).
This commit is contained in:
		
							parent
							
								
									db71b3ad43
								
							
						
					
					
						commit
						63979488e6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -162,7 +162,7 @@ static pid_t path_xargs(Shell_t *shp,const char *path, char *argv[],char *const | |||
| 	pid_t pid; | ||||
| 	if(shp->xargmin < 0) | ||||
| 		return((pid_t)-1); | ||||
| 	size = shp->gd->lim.arg_max-2048; | ||||
| 	size = shp->gd->lim.arg_max - (ARG_EXTRA_BYTES > 2 ? 1024*ARG_EXTRA_BYTES : 2048); | ||||
| 	for(ev=envp; cp= *ev; ev++) | ||||
| 		size -= strlen(cp) + 1 + ARG_EXTRA_BYTES; | ||||
| 	for(av=argv; (cp= *av) && av< &argv[shp->xargmin]; av++)   | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue