mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Send SIGHUP since some programs ignore SIGTERM, from Eduardo Grajeda in GitHub
issue 3958.
This commit is contained in:
		@@ -144,6 +144,17 @@ systemd_move_pid_to_new_cgroup(pid_t pid, char **cause)
 | 
				
			|||||||
		goto finish;
 | 
							goto finish;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Make sure that the session shells are terminated with SIGHUP since
 | 
				
			||||||
 | 
						 * bash and friends tend to ignore SIGTERM.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						r = sd_bus_message_append(m, "(sv)", "SendSIGHUP", "b", 1);
 | 
				
			||||||
 | 
						if (r < 0) {
 | 
				
			||||||
 | 
							xasprintf(cause, "failed to append to properties: %s",
 | 
				
			||||||
 | 
							    strerror(-r));
 | 
				
			||||||
 | 
							goto finish;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Inherit the slice from the parent process, or default to
 | 
						 * Inherit the slice from the parent process, or default to
 | 
				
			||||||
	 * "app-tmux.slice" if that fails.
 | 
						 * "app-tmux.slice" if that fails.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user