| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Force SIGSTOP to be the first signal reported after the attach.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a mask of optional ptrace() events.
302900:
Add a test for user signal delivery.
This test verifies we get the correct ptrace event details when a signal
is posted to a traced process from userland.
302902:
Add a mask of optional ptrace() events.
ptrace() now stores a mask of optional events in p_ptevents. Currently
this mask is a single integer, but it can be expanded into an array of
integers in the future.
Two new ptrace requests can be used to manipulate the event mask:
PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK
sets the current event mask.
The current set of events include:
- PTRACE_EXEC: trace calls to execve().
- PTRACE_SCE: trace system call entries.
- PTRACE_SCX: trace syscam call exits.
- PTRACE_FORK: trace forks and auto-attach to new child processes.
- PTRACE_LWP: trace LWP events.
The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have
been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces
P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS.
The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for
compatibility but now simply toggle corresponding flags in the
event mask.
While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both
modify the event mask and continue the traced process.
302921:
Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL.
303461:
Note that not all optional ptrace events use SIGTRAP.
New child processes attached due to PTRACE_FORK use SIGSTOP instead of
SIGTRAP. All other ptrace events use SIGTRAP.
304009:
Remove description of P_FOLLOWFORK as this flag was removed.
|
|
|
|
|
|
|
|
| |
I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL()
definition.
Suggested by: jhb
Sponsored by: The FreeBSD Foundation
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous 12h AM/PM format was perplexing as it didn't follow the
locale of the user and was a minor annoyance to FreeBSD users coming
from Linux. Additionally, the man page was incorrect about the strftime
format.
There are three time formats that may be displayed in the STARTED
column depending on the age of the process. Below is an example.
For a process started at 14:30 on Monday 16 March 2015, the following
formats may be used:
14:30 for process < 24h old (24h Timestamp)
Mon14 for process > 24h, < 1 week old (Weekday Hour)
16Mar15 for process > 1 week old (Day Month Year)
Differential Revision: https://reviews.freebsd.org/D1620
Reviewed by: brd
Approved by: trasz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
feature is to quisce the system before suspend.
Stop is implemented by reusing the thread_single(9) with the special
mode SINGLE_ALLPROC. SINGLE_ALLPROC differs from the existing
single-threading modes by allowing (requiring) caller to operate on
other process. Interruptible sleeps for !TDF_SBDRY threads are
suspended like SIGSTOP does it, instead of aborting the sleep, like
SINGLE_NO_EXIT, to avoid spurious EINTRs on resume.
Provide debugging sysctl debug.stop_all_proc, which causes total stop
and suspends syncer, while waiting for variable reset for resume. It
is used for debugging; should be removed after the real use of the
interface is added.
In collaboration with: pho
Discussed with: avg
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
Add a separate field which exports tracer pid and add a new keyword
("tracer") for ps to display it.
This is a follow up to r270444.
Reviewed by: kib
MFC after: 1 week
Relnotes: yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One problem is inferior(9) looping due to the process tree becoming a
graph instead of tree if the parent is traced by child. Another issue
is due to the use of p_oppid to restore the original parent/child
relationship, because real parent could already exited and its pid
reused (noted by mjg).
Add the function proc_realparent(9), which calculates the parent for
given process. It uses the flag P_TREE_FIRST_ORPHAN to detect the head
element of the p_orphan list and than stepping back to its container
to find the parent process. If the parent has already exited, the
init(8) is returned.
Move the P_ORPHAN and the new helper flag from the p_flag* to new
p_treeflag field of struct proc, which is protected by proctree lock
instead of proc lock, since the orphans relationship is managed under
the proctree_lock already.
The remaining uses of p_oppid in ptrace(PT_DETACH) and process
reapping are replaced by proc_realparent(9).
Phabric: D417
Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
|
|
|
|
|
| |
Reviewed by: jhb
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
-J 0 can be used to show only host processes.
Patch partially based on work by bz@
PR: bin/78763
MFC after: 2 weeks
Relnotes: yes
|
|
|
|
|
|
| |
parent is suspended, not the process itself.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ps(1) utility, e.g. "ps -O fib".
bin/ps/keyword.c:
Add the "fib" keyword and default its column name to "FIB".
bin/ps/ps.1:
Add "fib" as a supported keyword.
sys/compat/freebsd32/freebsd32.h:
sys/kern/kern_proc.c:
sys/sys/user.h:
Add the default fib number for a process (p->p_fibnum)
to the user land accessible process data of struct kinfo_proc.
Submitted by: Oliver Fromme <olli@fromme.com>, gibbs
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
| |
Submitted by: pluknet
Approved by: kib (mentor)
X-MFC-With: r240645
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 week
|
|
|
|
|
| |
Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week
|
|
|
|
|
| |
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
Spotted by: arundel
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
| |
instead of "?".
Submitted by: arundel
|
|
|
|
|
|
| |
Submitted by: Valentin Nechayev (netch % netch!kiev!ua), arundel
MFC after: 1 week
With-MFC: 225908
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- there's no reason the semantics of the -x flag are being explained in
the -a flag description
- be more precise regarding the relation between the -a flag and the
security.bsd.see_other_uids sysctl
- describe the format of the -t flag's argument
- 'con' no longer is a possible entry in the 'TT' column
- explain that the 'TT' column refers to pseudo-terminals via mere numbers
- add a hint in the 'tt' keyword description that a keyword 'tty' exists,
which will give the full terminal pathname
Submitted by: arundel (via docs@) (original)
MFC after: 1 week
With-MFC: 225908
|
|
|
|
|
| |
Submitted by: arundel (via docs@)
MFC after: 1 week
|
| |
|
| |
|
|
|
|
|
|
|
| |
and effective group name. Also, add "egid", "egroup" and "euid" aliases.
PR: bin/146331
Submitted by: Jeremie Le Hen <jeremie at le-hen dot org>
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
| |
pointer just like a dublicating "uprocp".
MFC after: 1 week
|
|
|
|
|
| |
Suggested by: arundel@
Reviewed by: arundel@
|
|
|
|
|
|
|
| |
corresponding times reported by getrusage().
Submitted by: Dan Nelson <dnelson allantgroup com>
MFC after: 1 week
|
|
|
|
| |
it using "ps -o class".
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
process address.
Add "tdaddr" keyword to ps(1) to display this thread address.
Distilled from Sandvine's patch set by Mark Johnston.
|
| |
|
|
|
|
| |
MFC after: 4 weeks
|
|
|
|
|
|
| |
o) Give slightly better (i.e. any) documentation of the format of "etime".
Reviewed by: jilles
|
|
|
|
|
|
|
| |
signals for process and its threads are distinct.
Reviewed by: jilles
MFC after: 2 weeks
|
|
|
|
| |
Approved by: re (kib)
|
|
|
|
|
|
| |
This is similar to linux's -H (or -f) switch.
MFC after: 3 weeks
|
| |
|
| |
|
|
|
|
|
|
| |
characters can be included in a custom column title string --
that's why it may appear at the end of a keyword list argument
only.
|
|
|
|
|
|
|
|
| |
the header title string "bar" extends to the end of the argument
even if it contains commas or spaces, unlike in RELENG_4 or earlier.
The modern syntax agrees with SUSv3.
MFC after: 3 days
|
|
|
|
| |
Submitted by: Michal Varga
|