runProgram: Uncomment chdir support
This commit is contained in:
		
							parent
							
								
									73b797c207
								
							
						
					
					
						commit
						f1b8e9efe7
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -1026,8 +1026,8 @@ void runProgram2(const RunOptions & options)
 | 
				
			||||||
        if (source && dup2(in.readSide.get(), STDIN_FILENO) == -1)
 | 
					        if (source && dup2(in.readSide.get(), STDIN_FILENO) == -1)
 | 
				
			||||||
            throw SysError("dupping stdin");
 | 
					            throw SysError("dupping stdin");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //if (options.chdir && chdir((*options.chdir).c_str()) == -1)
 | 
					        if (options.chdir && chdir((*options.chdir).c_str()) == -1)
 | 
				
			||||||
        //    throw SysError("chdir failed");
 | 
					            throw SysError("chdir failed");
 | 
				
			||||||
        if (options.gid && setgid(*options.gid) == -1)
 | 
					        if (options.gid && setgid(*options.gid) == -1)
 | 
				
			||||||
            throw SysError("setgid failed");
 | 
					            throw SysError("setgid failed");
 | 
				
			||||||
        /* Drop all other groups if we're setgid. */
 | 
					        /* Drop all other groups if we're setgid. */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue