Commit Graph

11 Commits

Author SHA1 Message Date
nicm
d0566a474a Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
2013-10-10 12:39:24 +00:00
millert
6a5adfc0ba We no longer use struct eproc for kinfo_proc in sysctl.h so there
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-12-18 21:28:45 +00:00
Nicholas Marriott
42272dfbd5 Use pgrp of pty fd not pid of immediate child when recovering current
working directory (like current process). From Marcel Partap.
2012-09-24 13:05:10 +00:00
Nicholas Marriott
f308ba93aa Change the way the working directory for new processes is discovered. If
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-12-09 16:28:18 +00:00
Philip Guenther
98d450ac3a Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc now
that we've got name we want for the API we want

"ZAP!" deraadt@
2011-04-10 03:20:59 +00:00
Philip Guenther
a3715e7867 Use sysctl() KERN_PROC2 instead of KERN_PROC, as the latter's ABI
is sensitive to changes in struct proc.

fixes for warnings and ok nicm@
2009-12-24 22:29:15 +00:00
Nicholas Marriott
ad18e45206 Nuke a dead variable found with clang and an unused declaration with lint. 2009-08-09 15:17:50 +00:00
Nicholas Marriott
189fb08e13 Split the comparison into a function to make this code smaller and more
understandable.
2009-08-03 17:12:07 +00:00
Nicholas Marriott
6b3b852ebc Go to the next if the current best process is replaced, don't keep comparing it
with itself. Also fix process name comparison.
2009-07-26 19:42:26 +00:00
Nicholas Marriott
c506e7f711 Also #ifndef nitems here, caught by Thomas Jeunet. 2009-06-26 10:55:37 +00:00
Nicholas Marriott
35876eaab9 Import tmux, a terminal multiplexor allowing (among other things) a single
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
2009-06-01 22:58:49 +00:00