mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Use %u for process group on Sun OS.
This commit is contained in:
		@@ -41,14 +41,13 @@ osdep_get_name(int fd, char *tty)
 | 
			
		||||
	if ((f = open(tty, O_RDONLY)) < 0)
 | 
			
		||||
		return (NULL);
 | 
			
		||||
 | 
			
		||||
	if ((fstat(f, &st) != 0) ||
 | 
			
		||||
	    (ioctl(f, TIOCGPGRP, &pgrp) != 0)) {
 | 
			
		||||
	if (fstat(f, &st) != 0 || ioctl(f, TIOCGPGRP, &pgrp) != 0) {
 | 
			
		||||
		close(f);
 | 
			
		||||
		return (NULL);
 | 
			
		||||
	}
 | 
			
		||||
	close(f);
 | 
			
		||||
 | 
			
		||||
	xasprintf(&path, "/proc/%hu/psinfo", pgrp);
 | 
			
		||||
	xasprintf(&path, "/proc/%u/psinfo", (u_int) pgrp);
 | 
			
		||||
	f = open(path, O_RDONLY);
 | 
			
		||||
	xfree(path);
 | 
			
		||||
	if (f < 0)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user