mirror of
				https://github.com/ClementTsang/bottom.git
				synced 2025-10-31 19:24:37 +01:00 
			
		
		
		
	fmt
This commit is contained in:
		
							parent
							
								
									b1f969880e
								
							
						
					
					
						commit
						db214a73c1
					
				| @ -59,8 +59,7 @@ pub fn kill_process_given_pid(pid: Pid) -> anyhow::Result<()> { | |||||||
| /// Kills a process, given a PID, for UNIX.
 | /// Kills a process, given a PID, for UNIX.
 | ||||||
| #[cfg(target_family = "unix")] | #[cfg(target_family = "unix")] | ||||||
| pub fn kill_process_given_pid(pid: Pid, signal: usize) -> anyhow::Result<()> { | pub fn kill_process_given_pid(pid: Pid, signal: usize) -> anyhow::Result<()> { | ||||||
|     // SAFETY: the signal should be valid, and we act properly on an error (exit
 |     // SAFETY: the signal should be valid, and we act properly on an error (exit code not 0).
 | ||||||
|     // code not 0).
 |  | ||||||
|     let output = unsafe { libc::kill(pid, signal as i32) }; |     let output = unsafe { libc::kill(pid, signal as i32) }; | ||||||
| 
 | 
 | ||||||
|     if output != 0 { |     if output != 0 { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user