mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master' into master
This commit is contained in:
		
							
								
								
									
										8
									
								
								job.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								job.c
									
									
									
									
									
								
							@@ -112,10 +112,10 @@ job_run(const char *cmd, struct session *s, const char *cwd,
 | 
				
			|||||||
		proc_clear_signals(server_proc, 1);
 | 
							proc_clear_signals(server_proc, 1);
 | 
				
			||||||
		sigprocmask(SIG_SETMASK, &oldset, NULL);
 | 
							sigprocmask(SIG_SETMASK, &oldset, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (cwd == NULL || chdir(cwd) != 0) {
 | 
							if ((cwd == NULL || chdir(cwd) != 0) &&
 | 
				
			||||||
			if ((home = find_home()) == NULL || chdir(home) != 0)
 | 
							    ((home = find_home()) == NULL || chdir(home) != 0) &&
 | 
				
			||||||
				chdir("/");
 | 
							    chdir("/") != 0)
 | 
				
			||||||
		}
 | 
								fatal("chdir failed");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		environ_push(env);
 | 
							environ_push(env);
 | 
				
			||||||
		environ_free(env);
 | 
							environ_free(env);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								spawn.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								spawn.c
									
									
									
									
									
								
							@@ -377,10 +377,10 @@ spawn_pane(struct spawn_context *sc, char **cause)
 | 
				
			|||||||
	 * Child process. Change to the working directory or home if that
 | 
						 * Child process. Change to the working directory or home if that
 | 
				
			||||||
	 * fails.
 | 
						 * fails.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (chdir(new_wp->cwd) != 0) {
 | 
						if (chdir(new_wp->cwd) != 0 &&
 | 
				
			||||||
		if ((tmp = find_home()) == NULL || chdir(tmp) != 0)
 | 
						    ((tmp = find_home()) == NULL || chdir(tmp) != 0) &&
 | 
				
			||||||
			chdir("/");
 | 
						    chdir("/") != 0)
 | 
				
			||||||
	}
 | 
							fatal("chdir failed");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Update terminal escape characters from the session if available and
 | 
						 * Update terminal escape characters from the session if available and
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user