Commit Graph

16 Commits

Author SHA1 Message Date
nicm
c426e485e5 Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
nicm
995af0e2b7 I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
deraadt
776eef49d8 Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
2015-01-16 06:40:13 +00:00
guenther
d1f939cede Track whether a process is a zombie or not yet fully built via flags
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's
thread data.  This eliminates the need for the thread-level SDEAD state.

Change kvm_getprocs() (both the sysctl() and kvm backends) to report the
"most active" scheduler state for the process's threads.

tweaks kettenis@
feedback and ok matthew@
2014-07-04 05:58:31 +00:00
nicm
5acee1c04e Memory leak in error path and unnecessary assignment, from clang. 2014-04-16 23:05:38 +00:00
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