OpenBSD CVS

CVS log for src/usr.bin/tmux/procname.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 22 17:35:01 2022 UTC (2 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.19: +1 -2 lines
Diff to previous 1.19 (colored)

MAXCOMLEN is no longer needed in these programs, so remove the annotation
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 7 00:40:03 2021 UTC (2 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

sys/signal.h (or some master include) must happen before sys/proc.h, which
is not standalone.
This problem is being hidden by a sys/param.h which cannot be deleted yet.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 7 00:38:42 2021 UTC (2 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Use PATH_MAX (the standard name) rather than MAXPATHLEN (from BSD sys/param.h)

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 8 11:26:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.16: +16 -1 lines
Diff to previous 1.16 (colored)

Restore pane_current_path format from portable tmux, it is no longer
used by default and is very useful.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:13 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

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)

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jul 4 05:58:31 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

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@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Apr 16 23:05:38 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Memory leak in error path and unnecessary assignment, from clang.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Oct 10 12:39:24 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.10: +1 -16 lines
Diff to previous 1.10 (colored)

Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 18 21:28:45 2012 UTC (11 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

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@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Sep 24 13:05:10 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

Use pgrp of pty fd not pid of immediate child when recovering current
working directory (like current process). From Marcel Partap.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 9 16:28:18 2011 UTC (12 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.7: +15 -2 lines
Diff to previous 1.7 (colored)

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.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 10 03:20:59 2011 UTC (13 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.6: +9 -9 lines
Diff to previous 1.6 (colored)

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@

Revision 1.6 / (download) - annotate - [select for diffs], Thu Dec 24 22:29:15 2009 UTC (14 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.5: +12 -20 lines
Diff to previous 1.5 (colored)

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@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 9 15:17:50 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

Nuke a dead variable found with clang and an unused declaration with lint.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Aug 3 17:12:07 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.3: +61 -59 lines
Diff to previous 1.3 (colored)

Split the comparison into a function to make this code smaller and more
understandable.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 26 19:42:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.2: +22 -15 lines
Diff to previous 1.2 (colored)

Go to the next if the current best process is replaced, don't keep comparing it
with itself. Also fix process name comparison.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jun 26 10:55:37 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

Also #ifndef nitems here, caught by Thomas Jeunet.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

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

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.