| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
| |
|
|
|
|
| |
Noticed by: brueffer
|
|
|
|
| |
Reviewed by: brueffer
|
|
|
|
|
|
| |
Submitted by: amdmi3
PR: 165431
MFC after: 1 week
|
|
|
|
|
|
|
| |
file descriptor via exec(3).
Now that daemon(8) has been fixed to resolve the issue noted by trociny,
the consensus is that this change should be OK.
|
|
|
|
|
|
|
| |
POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
setpriority) fails.
PR: kern/164238
Submitted by: Alexander Wittig <alexander@wittig.name>
Reviewed by: des
Approved by: cperciva
MFC after: 1 month
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the child process execs daemon's target program thanks to flock(2)
semantics. So, we apparently have to leak the open pidfile's file
descriptor to keep the lock for the pidfile(3) functions to work properly.
Test case demonstrated by trociny:
ref8-amd64:/home/trociny% uname -r
8.2-STABLE
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
daemon: process already running, pid: 19799
kopusha:~% uname -r
10.0-CURRENT
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~%
|
|
|
|
|
|
| |
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the following
line.
|
|
|
|
|
|
| |
format).
Requested by bde
|
|
|
|
| |
Requested by bde.
|
|
|
|
| |
Requested by bde (as was the previous commit).
|
|
|
|
|
|
| |
Fix header comments for each section of constants.
Fix whitespace in #define lines.
Fix unnecessary parenthesis in constants.
|
|
|
|
|
|
|
|
|
| |
for pidfh in libutil.h in its place.
This allows us to hide the contents of the pidfh structure, and also
allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the
pidfile_* function prototypes.
Suggested by pjd.
|
|
|
|
| |
Requested by bde.
|
|
|
|
|
|
| |
and namespace fix for property_find() prototype.
Provided by bde.
|
| |
|
|
|
|
| |
Requested by bde.
|
|
|
|
|
|
| |
Add missing prototype parameter names.
Requested by bde.
|
|
|
|
| |
Requested by bde.
|
|
|
|
|
|
| |
rather than using fcntl(2) later, and in addition to saving a system
call, removes a possible race with fork/exec from threads or signal
handlers.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
file descriptor, and that errors can be returned as a result of the
fcntl(2) system call.
|
|
|
|
| |
pidfile.
|
|
|
|
| |
Discussed with: pjd, des
|
| |
|
|
|
|
|
|
| |
while here, fix missing parentheses of the return statement of pw_make.
Approved by: des (mentor)
|
|
|
|
|
|
|
|
|
|
| |
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user
add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.
Reviewed by: des
Approved by: des
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
| |
and the caller requested other process' PID by passing non-NULL pidptr
argument, we will wait at most 100ms for the PID to show up in the file and if
it won't, we will store -1 in *pidptr.
From now on, pidfile_open() function never sets errno to EAGAIN on failure.
In collaboration with: des
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file and processes information retrieval from the running kernel via sysctl
in the form of new library, libprocstat. The library also supports KVM backend
for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have
been modified to take advantage of the library (as the bonus point the fstat(1)
utility no longer need superuser privileges to operate), and the procstat(1)
utility is now able to display information from memory dumps as well.
The newly introduced fuser(1) utility also uses this library and able to operate
via sysctl and kvm backends.
The library is by no means complete (e.g. KVM backend is missing vnode name
resolution routines, and there're no manpages for the library itself) so I
plan to improve it further. I'm commiting it so it will get wider exposure
and review.
We won't be able to MFC this work as it relies on changes in HEAD, which
was introduced some time ago, that break kernel ABI. OTOH we may be able
to merge the library with KVM backend if we really need it there.
Discussed with: rwatson
|
| |
|
|
|
|
|
|
|
|
|
|
| |
prefixes (Ki, Mi, Gi...) for humanize_number(3).
Note that applications has to pass HN_IEC_PREFIXES to use this
feature for backward compatibility reasons.
Reviewed by: arundel
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
- RLIMIT_NPTS
- RLIMIT_SWAP
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
integer overflow when the input is very large (for example, 100 Pi would
become about 10 Ei which exceeded signed int64_t).
Solve this issue by splitting the division into two parts and avoid the
multiplication.
PR: bin/146205
Reviewed by: arundel
MFC after: 1 month
|
|
|
|
|
| |
Submitted by: arundel (via doc@)
MFC after: 3 days
|
|
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL. This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).
Reviewed by: kib (as part of a larger patch)
|
|
|
|
| |
They have no effect when coming in pairs, or before .Bl/.Bd
|
| |
|
|
|
|
|
|
| |
translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
|