summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/procname.c
AgeCommit message (Collapse)Author
2012-12-18We no longer use struct eproc for kinfo_proc in sysctl.h so thereTodd C. Miller
is no direct need for sys/proc.h or sys/resource.h. Some consumers of kinfo_proc need these for the proc flags and rlimit defines like RLIM_INF so add the appropriate includes to them. OK deraadt@ sthen@
2012-09-24Use pgrp of pty fd not pid of immediate child when recovering currentNicholas Marriott
working directory (like current process). From Marcel Partap.
2011-12-09Change the way the working directory for new processes is discovered. IfNicholas Marriott
default-path isn't empty, it is used. Otherwise: 1) If tmux neww is run from the command line, the working directory of the client is used. 2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current working directory of the process in the active pane. 3) If that fails, the directory where the session was created is used. Support code by Romain Francois, OpenBSD specific bits by me. Note this requires a recent userland and kernel with KERN_PROC_CWD.
2011-04-10Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc nowPhilip Guenthe
that we've got name we want for the API we want "ZAP!" deraadt@
2009-12-24Use sysctl() KERN_PROC2 instead of KERN_PROC, as the latter's ABIPhilip Guenthe
is sensitive to changes in struct proc. fixes for warnings and ok nicm@
2009-08-09Nuke a dead variable found with clang and an unused declaration with lint.Nicholas Marriott
2009-08-03Split the comparison into a function to make this code smaller and moreNicholas Marriott
understandable.
2009-07-26Go to the next if the current best process is replaced, don't keep comparing itNicholas Marriott
with itself. Also fix process name comparison.
2009-06-26Also #ifndef nitems here, caught by Thomas Jeunet.Nicholas Marriott
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti