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