| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementations visible for use by applications. The functions $F that
are now weak symbols are:
allocm, calloc, dallocm, free, malloc, malloc_usable_size,
nallocm, posix_memalign, rallocm, realloc, sallocm
The non-weak implementations of $F are exported as __$F.
Submitted by: stevek@juniper.net
Reviewed by: jasone@, kib@
Approved by: jasone@ (jemalloc)
Obtained from: juniper Networks, Inc
|
|
|
|
| |
The HISTORY subsection still says that sigreturn() was added in 4.3BSD.
|
|
|
|
|
|
|
|
|
| |
- Remove an unneeded variable.
- Fix whitespace bugs.
- Fix typoes in comment.
- Improve string handling a bit. Don't handroll strstr() and don't
terminate a strdup()'ed string. Instead, simply strndup() the part we
need.
|
|
|
|
|
|
|
| |
If we were already provided a struct _citrus_iconv (e.g. through
iconv_open_into()), we should not call free() in case io_init_context()
fails. Instead, call it on the pointer of the allocated object, which
will be NULL in case of iconv_open_into().
|
|
|
|
|
|
| |
- Add NO_WMISSING_VARIABLE_DECLARATIONS where we use Yacc/Lex.
- Add variable declarations where possible.
- Add missing static keyword.
|
|
|
|
|
|
| |
Remove the lists of unneeded header files.
Requested by: eadler
|
|
|
|
|
|
|
|
|
|
|
|
| |
The <uchar.h> header, part of C11, adds a small number of utility
functions for 16/32-bit "universal" characters, which may or may not be
UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight
wrappers around wcrtomb() and mbrtowc().
While there, also add (non-yet-standard) _l functions, similar to the
ones we already have for the other locale-dependent functions.
Reviewed by: theraven
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If 'e' is used, the kernel must support the recently added pipe2() system
call.
The use of pipe2() with O_CLOEXEC also fixes race conditions between
concurrent popen() calls from different threads, even if the close-on-exec
flag on the fd of the returned FILE is later cleared (because popen() closes
all file descriptors from earlier popen() calls in the child process).
Therefore, this approach should be used in all cases when pipe2() can be
assumed present.
The old version of popen() rejects "re" and "we" but treats "r+e" like "r+".
|
|
|
|
|
|
|
| |
PR: 178642
Reported by: Michael Galassi (michaelgalassi@gmail.com)
Approved by: sbruno (mentor)
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/176054
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
The ability to clear a file descriptor's close-on-exec flag via
posix_spawn_file_actions_adddup2() is in fact proposed in Austin Group issue
#411.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file
descriptor is negative, not [EINVAL]. The bug was only in the manual page;
the code is correct.
MFC after: 1 week
|
| |
|
| |
|
|
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
| |
MFC after: 3 days
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
querylocale is not part of IEEE Std 1003.1-2008.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and
O_NONBLOCK (on both sides) as part of the function.
If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p).
If the pointer is not valid, behaviour differs: pipe2() writes into the
array from the kernel like socketpair() does, while pipe() writes into the
array from an architecture-specific assembler wrapper.
Reviewed by: kan, kib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling the
non-blocking status on the new socket. (Note that the latter point means
that accept() is not equivalent to any form of accept4().)
The linuxulator's accept4 implementation leaves a race window where the new
file descriptor is not close-on-exec because it calls sys_accept(). This
implementation leaves no such race window (by using falloc() flags). The
linuxulator could be fixed and simplified by using the new code.
Like accept(), accept4() is async-signal-safe, a cancellation point and
permitted in capability mode.
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
| |
Reported by: bde
MFC after: 1 week
|
|
|
|
|
|
|
| |
getdtablesize() returns the limit on new file descriptors; this says nothing
about existing descriptors.
MFC after: 1 week
|
|
|
|
| |
And add '__restrict' where it appeared in the header prototypes
|
|
|
|
|
|
|
| |
NetBSD, OpenBSD, and Android's Bionic all number the clauses 1 through 3,
so follow suit to make comparison easier.
Acked-by: imp@
|
|
|
|
|
|
|
|
| |
- make the prototype of sl_find match NetBSD
Reviewed by: jilles
Approved by: cperciva (mentor)
MFC After: 3 days
|
|
|
|
|
|
| |
Reviewed by: jilles
Approved by: cperciva (mentor)
MFC After: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
There are no getdtablesize() bounds on the file descriptor to be duplicated;
it only has to be open. If the RLIMIT_NOFILE rlimit was decreased after
opening the file descriptor, it may be greater than or equal to
getdtablesize() but still valid.
MFC after: 1 week
|
|
|
|
|
|
| |
PR: 177025
Submitted by: Fernando <fernando.apesteguia@gmail.com>
Reviewed by: theraven
|
|
|
|
|
|
|
| |
Also fix cpu_getaffinity(2) document title.
PR: 176317
Submitted by: brucec
|
|
|
|
|
|
|
|
|
|
| |
The functions utx_active_add(), utx_active_remove(), utx_lastlogin_add() and
utx_log_add() set errno to 0 if they are successful. This not only violates
POSIX if pututxline() is successful, but may also overwrite a valid error
with 0 if, for example, utx_lastlogin_add() fails while utx_log_add()
succeeds.
Reviewed by: ed
|
|
|
|
| |
Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
|
| |
|
|
|
|
|
|
|
|
| |
signal.
- Fix the old ksem implementation for POSIX semaphores to not restart
sem_wait() or sem_timedwait() if interrupted by a signal.
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/177704
Submitted by: martymac
MFC after: 1 week
|
| |
|
| |
|
|
|
|
|
|
|
| |
Remove unused code.
While there, do some cleanup of the code.
MFC after: 1 week
|
|
|
|
|
|
| |
messages (SO_BINTIME, SO_TIMEVAL).
Obtained from: phk
|
|
|
|
|
|
|
|
| |
source sysctl(KERN_ARND) and remove the fallback code.
Obtained from: OpenBSD
Reviewed by: secteam
MFC after: 1 month
|
|
|
|
|
|
|
|
|
| |
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*. Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
Words in shell script are separated by spaces or tabs independent of the
value of IFS. The value of IFS is only relevant for the result of
substitutions. Therefore, there should be a space between 'wordexp' and the
words to be expanded, not an IFS character.
Paranoia might dictate that the shell ignore IFS from the environment (even
though our sh currently uses it), so do not depend on it in the new test
case.
|