| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
by setproctitle().
Reviewed by: jkh
|
|
|
|
|
|
| |
Also, make an internal _getprogname() that is used only inside
libc. For libc, getprogname(3) is a weak symbol in case a
function of the same name is defined in userland.
|
| |
|
|
|
|
|
|
|
|
| |
a NULL argument. Some programs change the contents of the argv
array, typically to remove some special arguments. They shorten
argv by storing a NULL where an argument pointer used to be. Such
programs core dumped if they called setproctitle(), because it
would try to apply strlen() to a NULL pointer.
|
|
|
|
|
| |
iterating over the arguments. Doing so wipes out the value which
is about to be stored into the ps_strings structure.
|
|
|
|
|
|
|
| |
character, skip the program name when setting the process title.
Ansified with extreme prejudice.
Reviewed by: peter
|
|
|
|
| |
(if it's able).
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.
To disable this facility and revert to previous behaviour:
sysctl -w kern.ps_arg_cache_limit=0
For full details see the current@FreeBSD.org mail-archives.
|
| |
|
|
|
|
|
|
|
|
| |
an unimprovement here. I thought it would be an improvement, as in libkvm,
but here we can access the strings directly.
Use sysctlbyname() instead of sysctl() and trust it to give a nonzero
address if it succeeds.
|
| |
|
|
|
|
| |
redone for every call of setproctitle().
|
| |
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
|
|
|
| |
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
|
|
|
|
|
|
|
| |
the statically compiled PS_STRINGS and USRSTACK variables. This prevents
programs using setproctitle from coredumping if the kernel VM is increased,
and stops libkvm users (w, ps, etc) from needing to be recompiled if only
the VM layout changes.
|
|
replace the dozen other various hacks in the code that do all sorts
of crude things including spamming the envrionment strings with the new
argv string.
This version is mainly inspired by the sendmail version, with a couple of
ideas taken from the NetBSD implementation as well.
|