Author: jilles
Date: Thu May 9 21:29:13 2013
New Revision: 250421
URL: http://svnweb.freebsd.org/changeset/base/250421
Log:
posix_spawn_file_actions_adddup2(3): Document difference with dup2().
The ability to clear a file descriptor's close-on-exec flag via
posix_spawn_file_actions_adddu
Author: jilles
Date: Thu May 9 16:42:01 2013
New Revision: 250412
URL: http://svnweb.freebsd.org/changeset/base/250412
Log:
posix_spawn_file_actions_addopen(3): Correct error for bad file descriptor.
As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file
descriptor i
Author: jilles
Date: Thu May 9 11:43:45 2013
New Revision: 250406
URL: http://svnweb.freebsd.org/changeset/base/250406
Log:
wordexp(): Simplify code by deferring work to sh.
Modified:
head/lib/libc/gen/wordexp.c
Modified: head/lib/libc/gen/wordexp.c
=
Author: jilles
Date: Sun May 5 10:51:40 2013
New Revision: 250267
URL: http://svnweb.freebsd.org/changeset/base/250267
Log:
sh: Use O_CLOEXEC and F_DUPFD_CLOEXEC instead of separate fcntl() call.
Modified:
head/bin/sh/input.c
head/bin/sh/jobs.c
head/bin/sh/main.c
head/bin/sh/redir.c
M
Author: jilles
Date: Sat May 4 11:45:48 2013
New Revision: 250231
URL: http://svnweb.freebsd.org/changeset/base/250231
Log:
libkvm: Make second /dev/null file descriptor close-on-exec as well.
MFC after:1 week
Modified:
head/lib/libkvm/kvm.c
Modified: head/lib/libkvm/kvm.c
Author: jilles
Date: Sat May 4 09:47:51 2013
New Revision: 250230
URL: http://svnweb.freebsd.org/changeset/base/250230
Log:
libkvm: Use O_CLOEXEC instead of separate fcntl(F_SETFD) call.
MFC after:1 week
Modified:
head/lib/libkvm/kvm.c
Modified: head/lib/libkvm/kvm.c
==
Author: jilles
Date: Fri May 3 20:39:53 2013
New Revision: 250222
URL: http://svnweb.freebsd.org/changeset/base/250222
Log:
sh: Remove racy test case for read builtin.
This test case sometimes fails because of an EINTR-related race condition.
Fixing this race condition likely requires an
Author: jilles
Date: Fri May 3 15:28:31 2013
New Revision: 250214
URL: http://svnweb.freebsd.org/changeset/base/250214
Log:
sh: Improve error handling in read builtin:
* If read -t times out, return status as if interrupted by SIGALRM
(formerly 1).
* If a trapped signal interrupts re
Author: jilles
Date: Wed May 1 23:04:29 2013
New Revision: 250163
URL: http://svnweb.freebsd.org/changeset/base/250163
Log:
Bump __FreeBSD_version for accept4() and pipe2().
Modified:
head/sys/sys/param.h
Modified: head/sys/sys/param.h
===
Author: jilles
Date: Wed May 1 22:47:47 2013
New Revision: 250161
URL: http://svnweb.freebsd.org/changeset/base/250161
Log:
accept(2), pipe(2): Fix .Dd.
Modified:
head/lib/libc/sys/accept.2
head/lib/libc/sys/pipe.2
Modified: head/lib/libc/sys/accept.2
=
Author: jilles
Date: Wed May 1 22:45:04 2013
New Revision: 250160
URL: http://svnweb.freebsd.org/changeset/base/250160
Log:
Regenerate files for pipe2().
Modified:
head/sys/compat/freebsd32/freebsd32_proto.h
head/sys/compat/freebsd32/freebsd32_syscall.h
head/sys/compat/freebsd32/freebsd3
Author: jilles
Date: Wed May 1 22:42:42 2013
New Revision: 250159
URL: http://svnweb.freebsd.org/changeset/base/250159
Log:
Add pipe2() system call.
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 p
Author: jilles
Date: Wed May 1 20:12:58 2013
New Revision: 250155
URL: http://svnweb.freebsd.org/changeset/base/250155
Log:
Regenerate files for accept4().
Modified:
head/sys/compat/freebsd32/freebsd32_proto.h
head/sys/compat/freebsd32/freebsd32_syscall.h
head/sys/compat/freebsd32/freebs
Author: jilles
Date: Wed May 1 20:10:21 2013
New Revision: 250154
URL: http://svnweb.freebsd.org/changeset/base/250154
Log:
Add accept4() system call.
The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling
Author: jilles
Date: Tue Apr 30 15:06:30 2013
New Revision: 250102
URL: http://svnweb.freebsd.org/changeset/base/250102
Log:
socket: Make shutdown() wake up a blocked accept().
A blocking accept (and some other operations) waits on &so->so_timeo. Once
it wakes up, it will detect the SBS_C
On Sat, Apr 27, 2013 at 04:36:56AM +1000, Bruce Evans wrote:
> On Fri, 26 Apr 2013, Jilles Tjoelker wrote:
> > On Thu, Apr 25, 2013 at 09:56:01PM +1000, Bruce Evans wrote:
> >> On Wed, 24 Apr 2013, Jilles Tjoelker wrote:
> >>> Log:
> >>> getdtablesiz
Author: jilles
Date: Sat Apr 27 14:21:36 2013
New Revision: 249985
URL: http://svnweb.freebsd.org/changeset/base/249985
Log:
libthr: Fix a parameter name in an internal header file.
Modified:
head/lib/libthr/thread/thr_umtx.h
Modified: head/lib/libthr/thread/thr_umtx.h
==
Author: jilles
Date: Sat Apr 27 14:07:25 2013
New Revision: 249984
URL: http://svnweb.freebsd.org/changeset/base/249984
Log:
sh: Don't consider jobs -s/-p as reporting the status of jobs.
This ensures that something like j=$(jobs -p) does not prevent any
status from being written to the t
Author: jilles
Date: Sat Apr 27 13:26:35 2013
New Revision: 249983
URL: http://svnweb.freebsd.org/changeset/base/249983
Log:
syslogd: Use closefrom() instead of getdtablesize()/close() loop.
When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.
Author: jilles
Date: Sat Apr 27 11:55:23 2013
New Revision: 249979
URL: http://svnweb.freebsd.org/changeset/base/249979
Log:
intro(2): Fix some errors in ENFILE and EMFILE descriptions.
MFC after:1 week
Modified:
head/lib/libc/sys/intro.2
Modified: head/lib/libc/sys/intro.2
Author: jilles
Date: Fri Apr 26 21:43:42 2013
New Revision: 249956
URL: http://svnweb.freebsd.org/changeset/base/249956
Log:
sysconf(3): Correct the description of _SC_OPEN_MAX.
Reported by: bde
MFC after:1 week
Modified:
head/lib/libc/gen/sysconf.3
Modified: head/lib/libc/gen/sy
On Thu, Apr 25, 2013 at 09:56:01PM +1000, Bruce Evans wrote:
> On Wed, 24 Apr 2013, Jilles Tjoelker wrote:
> > Log:
> > getdtablesize(2): Describe what this function actually does.
> > getdtablesize() returns the limit on new file descriptors; this
> > says nothing
Author: jilles
Date: Wed Apr 24 21:24:35 2013
New Revision: 249859
URL: http://svnweb.freebsd.org/changeset/base/249859
Log:
getdtablesize(2): Describe what this function actually does.
getdtablesize() returns the limit on new file descriptors; this says nothing
about existing descriptors
Author: jilles
Date: Sun Apr 21 19:42:04 2013
New Revision: 249739
URL: http://svnweb.freebsd.org/changeset/base/249739
Log:
dup(2): Remove incorrect sentence about getdtablesize().
There are no getdtablesize() bounds on the file descriptor to be duplicated;
it only has to be open. If the
Author: jilles
Date: Fri Apr 19 10:16:00 2013
New Revision: 249644
URL: http://svnweb.freebsd.org/changeset/base/249644
Log:
sem: Restart the POSIX sem_* calls after signals with SA_RESTART set.
Programs often do not expect an [EINTR] return from sem_wait() and POSIX
only allows it if the
Author: jilles
Date: Wed Apr 17 21:08:15 2013
New Revision: 249593
URL: http://svnweb.freebsd.org/changeset/base/249593
Log:
pututxline: Don't set errno=0 in subfunctions.
The functions utx_active_add(), utx_active_remove(), utx_lastlogin_add() and
utx_log_add() set errno to 0 if they are
uggest pthread cancellation,
not returning from the signal handler or leaving the default
action in place (if it is termination). The racy functionality can be
kept by leaving [EINTR] and [ERESTART] from the sleep function as they
are except for changing [ERESTART] to [EINTR] when UMTX_OP_SEM_WAIT was
Author: jilles
Date: Sun Apr 14 11:44:47 2013
New Revision: 249471
URL: http://svnweb.freebsd.org/changeset/base/249471
Log:
libc: Fix typo in French translation.
PR: kern/177704
Submitted by: martymac
MFC after:1 week
Modified:
head/lib/libc/nls/fr_FR.ISO8859-1.msg
Mo
Author: jilles
Date: Fri Apr 12 19:47:32 2013
New Revision: 249425
URL: http://svnweb.freebsd.org/changeset/base/249425
Log:
libthr: Remove _thr_rtld_fini(), unused since r245630.
Modified:
head/lib/libthr/thread/thr_private.h
head/lib/libthr/thread/thr_rtld.c
Modified: head/lib/libthr/thr
Author: jilles
Date: Fri Apr 12 15:19:35 2013
New Revision: 249407
URL: http://svnweb.freebsd.org/changeset/base/249407
Log:
sh: Don't modify exit status when break/continue/return passes !.
This matches what would happen if ! P were to be replaced with
if P; then false; else true; fi.
Author: jilles
Date: Sun Apr 7 16:28:36 2013
New Revision: 249235
URL: http://svnweb.freebsd.org/changeset/base/249235
Log:
sh: Add const to nodesavestr().
Modified:
head/bin/sh/nodes.c.pat
Modified: head/bin/sh/nodes.c.pat
===
Author: jilles
Date: Sun Apr 7 15:26:09 2013
New Revision: 249233
URL: http://svnweb.freebsd.org/changeset/base/249233
Log:
mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.
POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that
has close-on-exec set. How
Author: jilles
Date: Sat Apr 6 22:30:46 2013
New Revision: 249220
URL: http://svnweb.freebsd.org/changeset/base/249220
Log:
sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0.
Added:
head/tools/regression/bin/sh/builtins/eval6.0
- copied, changed from r248873,
head/to
Author: jilles
Date: Sat Apr 6 22:28:19 2013
New Revision: 249219
URL: http://svnweb.freebsd.org/changeset/base/249219
Log:
Add warning about SOCK_CLOEXEC and SOCK_NONBLOCK (r248534).
Reviewed by: rpaulo
Modified:
head/UPDATING
Modified: head/UPDATING
=
On Sat, Apr 06, 2013 at 01:06:24AM -0700, Peter Wemm wrote:
> On Wed, Mar 20, 2013 at 4:50 PM, Jilles Tjoelker wrote:
> > On Wed, Mar 20, 2013 at 01:18:56PM +0400, Gleb Smirnoff wrote:
> >> On Tue, Mar 19, 2013 at 08:58:18PM +0000, Jilles Tjoelker wrote:
> >> J> Au
27;t be
>used in new code in FreeBSD.
I think it is fine to have static OIDs for sysctls that are very
commonly used because it saves a system call to translate the name to
the OID.
> - bogus cast of &next. In the old code, the cast had an additional style
>bug (space after it), but it was necessary and probably sufficient for
>supporting K&R with no prototypes. Now it is certainly insufficient, since
>the NULL and 0 args to sysctl() are not cast.
The cast is indeed against style.
--
Jilles Tjoelker
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Author: jilles
Date: Tue Apr 2 21:34:38 2013
New Revision: 249034
URL: http://svnweb.freebsd.org/changeset/base/249034
Log:
sh: Write as much into the heredoc pipe as possible, to avoid forking.
Use non-blocking I/O to write as much as the pipe will accept (often 64K,
but it can be as li
Author: jilles
Date: Mon Apr 1 20:50:07 2013
New Revision: 248987
URL: http://svnweb.freebsd.org/changeset/base/248987
Log:
wordexp(): Remove wrong IFS usage.
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
Author: jilles
Date: Mon Apr 1 17:18:22 2013
New Revision: 248980
URL: http://svnweb.freebsd.org/changeset/base/248980
Log:
sh: Fix various compiler warnings.
It now passes WARNS=7 with clang on i386.
GCC 4.2.1 does not understand setjmp() properly so will always trigger
-Wuninitial
Author: jilles
Date: Sun Mar 31 17:42:54 2013
New Revision: 248951
URL: http://svnweb.freebsd.org/changeset/base/248951
Log:
Rename do_pipe() to kern_pipe2() and declare it properly.
Modified:
head/sys/compat/linux/linux_file.c
head/sys/kern/sys_pipe.c
head/sys/sys/syscallsubr.h
Modified
Author: jilles
Date: Sat Mar 30 13:30:27 2013
New Revision: 248932
URL: http://svnweb.freebsd.org/changeset/base/248932
Log:
Improve namespacing in :
* MSG_NOSIGNAL is in POSIX.1-2008.
* MSG_NOTIFICATION (SCTP) is not in POSIX.
* PRU_FLUSH_* (SCTP) are not in POSIX.
* bindat()/con
Author: jilles
Date: Wed Mar 27 21:31:40 2013
New Revision: 248803
URL: http://svnweb.freebsd.org/changeset/base/248803
Log:
btowc(3), isblank(3): Correct prototypes for _l variants.
MFC after:1 week
Modified:
head/lib/libc/locale/btowc.3
head/lib/libc/locale/isblank.3
Modified: h
Author: jilles
Date: Tue Mar 26 22:46:56 2013
New Revision: 248774
URL: http://svnweb.freebsd.org/changeset/base/248774
Log:
accept(2): Mention inheritance of O_ASYNC and signal destination.
While almost nobody uses O_ASYNC, and rightly so, the inheritance of the
related properties across
Author: jilles
Date: Sun Mar 24 22:48:45 2013
New Revision: 248692
URL: http://svnweb.freebsd.org/changeset/base/248692
Log:
sh(1): Mention possible ambiguities with $(( and ((.
In some other shells, things like $((a);(b)) are command substitutions.
Also, there are shells that have an
Author: jilles
Date: Fri Mar 22 20:12:25 2013
New Revision: 248620
URL: http://svnweb.freebsd.org/changeset/base/248620
Log:
rc.d/sysctl: Fix error messages about unknown OIDs.
There are three situations where the sysctl script is called:
1. "start", very early
2. "lastload", near the e
Author: jilles
Date: Thu Mar 21 21:39:15 2013
New Revision: 248593
URL: http://svnweb.freebsd.org/changeset/base/248593
Log:
Allow O_CLOEXEC in posix_openpt() flags.
PR: kern/162374
Reviewed by: ed
Modified:
head/lib/libc/sys/posix_openpt.2
head/sys/kern/tty_pts.c
Modifie
On Wed, Mar 20, 2013 at 01:18:56PM +0400, Gleb Smirnoff wrote:
> On Tue, Mar 19, 2013 at 08:58:18PM +0000, Jilles Tjoelker wrote:
> J> Author: jilles
> J> Date: Tue Mar 19 20:58:17 2013
> J> New Revision: 248534
> J> URL: http://svnweb.freebsd.org/changeset/base/248534
Author: jilles
Date: Tue Mar 19 20:58:17 2013
New Revision: 248534
URL: http://svnweb.freebsd.org/changeset/base/248534
Log:
Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.
This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and
Author: jilles
Date: Sun Mar 17 22:51:58 2013
New Revision: 248446
URL: http://svnweb.freebsd.org/changeset/base/248446
Log:
find: Include nanoseconds when comparing timestamps of files.
When comparing to the timestamp of a given file using -newer, -Xnewer and
-newerXY (where X and Y are
Author: jilles
Date: Fri Mar 15 20:29:31 2013
New Revision: 248349
URL: http://svnweb.freebsd.org/changeset/base/248349
Log:
sh: Recognize "--" and explicitly reject options in wait builtin.
If syntactically invalid job identifiers are to be taken as jobs that exited
with status 127, this
Author: jilles
Date: Wed Mar 13 18:38:18 2013
New Revision: 248252
URL: http://svnweb.freebsd.org/changeset/base/248252
Log:
libc: Avoid SIGPIPE when nscd closes the connection unexpectedly.
It is almost always a bug if nscd closes the connection unexpectedly but
programs should not be ki
Author: jilles
Date: Sun Mar 3 17:33:59 2013
New Revision: 247720
URL: http://svnweb.freebsd.org/changeset/base/247720
Log:
sh: When executing a trap, keep exit status along with evalskip.
This ensures 'return' in a trap returns the correct status to the caller.
If evalskip is not set
Author: jilles
Date: Sun Mar 3 15:02:56 2013
New Revision: 247716
URL: http://svnweb.freebsd.org/changeset/base/247716
Log:
MAINTAINERS: Document my maintainership of sh(1).
Modified:
head/MAINTAINERS
Modified: head/MAINTAINERS
===
On Sun, Mar 03, 2013 at 02:43:14PM +0100, Jilles Tjoelker wrote:
> On Sun, Mar 03, 2013 at 02:11:04AM +, Pedro F. Giffuni wrote:
> > Author: pfg
> > Date: Sun Mar 3 02:11:03 2013
> > New Revision: 247683
> > URL: http://svnweb.freebsd.org/changeset/base/247683
>
Author: jilles
Date: Sun Mar 3 14:42:15 2013
New Revision: 247713
URL: http://svnweb.freebsd.org/changeset/base/247713
Log:
libedit: Revert r247683 to fix buildworld.
I think r247683 is wrong because libedit.so actually uses symbols from
libcurses.so. Since it breaks the build, revert it
then give it the oldest version where libedit.so expects a newer
version.
Perhaps we should add -Wl,--no-undefined to SOLINKOPTS in bsd.lib.mk
with the exception of libraries that deliberately have undefined symbols
(for example, to be supplied by the application).
--
Jilles Tjoelker
Author: jilles
Date: Sat Mar 2 12:42:23 2013
New Revision: 247619
URL: http://svnweb.freebsd.org/changeset/base/247619
Log:
nullfs: Improve f_flags in statfs().
Include some flags of the nullfs mount itself:
MNT_RDONLY, MNT_NOEXEC, MNT_NOSUID, MNT_UNION, MNT_NOSYMFOLLOW.
This allows
On Wed, Feb 27, 2013 at 07:25:48PM +1100, Peter Jeremy wrote:
> On 2013-Feb-26 01:02:27 +0100, Jilles Tjoelker wrote:
> >> Enhance test(1) by adding provision to compare any combination of the
> >> access, birth, change and modify times of two files, instead of only
1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 1 $b $b
The ctime cannot be manipulated explicitly but the other times can be
set in the future so both relations with the ctime can be tested.
The touch -a is indeed required because file reads do not set the atime
if the filesyst
Author: jilles
Date: Sun Feb 24 20:53:32 2013
New Revision: 247236
URL: http://svnweb.freebsd.org/changeset/base/247236
Log:
libc/opendir: Improve behaviour of union uniquifier:
* Reopen the directory using openat(fd, ".", ...) instead of opening the
pathname again. This fixes a race co
Author: jilles
Date: Sat Feb 23 22:50:57 2013
New Revision: 247206
URL: http://svnweb.freebsd.org/changeset/base/247206
Log:
sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
Added:
head/tools/regression/bin/sh/builtins/wait4.0 (contents, props changed)
head/tools/regre
Author: jilles
Date: Sat Feb 23 15:15:41 2013
New Revision: 247190
URL: http://svnweb.freebsd.org/changeset/base/247190
Log:
sh: Test that the exit status is 1 if read encounters EOF.
Added:
head/tools/regression/bin/sh/builtins/read6.0 (contents, props changed)
Added: head/tools/regressio
Author: jilles
Date: Tue Feb 19 23:46:51 2013
New Revision: 247013
URL: http://svnweb.freebsd.org/changeset/base/247013
Log:
sh: Fix a crash with the stackmark code.
If a stack mark is set while the current stack block is empty, the stack
block may move later on (because of realloc()) and
Author: jilles
Date: Mon Feb 18 22:47:59 2013
New Revision: 246952
URL: http://svnweb.freebsd.org/changeset/base/246952
Log:
setbuf(3): Restore a BUGS section about setbuf().
The brokenness of setbuf() is not specific to 4.2BSD and 4.3BSD but inherent
in the API definition.
Reported
On Sat, Feb 16, 2013 at 04:08:06AM +1100, Bruce Evans wrote:
> On Fri, 15 Feb 2013, Jilles Tjoelker wrote:
> > Log:
> > setbuf(3): Remove bugs section about ancient versions of BSD.
> > Modified:
> > head/lib/libc/stdio/setbuf.3
> > Modif
Author: jilles
Date: Fri Feb 15 10:44:07 2013
New Revision: 246824
URL: http://svnweb.freebsd.org/changeset/base/246824
Log:
setbuf(3): Remove bugs section about ancient versions of BSD.
Modified:
head/lib/libc/stdio/setbuf.3
Modified: head/lib/libc/stdio/setbuf.3
===
Author: jilles
Date: Sun Feb 10 23:09:15 2013
New Revision: 246641
URL: http://svnweb.freebsd.org/changeset/base/246641
Log:
fts: Use O_DIRECTORY when opening name that might be changed by attacker.
There are uncommon cases where fts_safe_changedir() may be called with a
non-NULL name tha
Author: jilles
Date: Sun Feb 10 18:56:37 2013
New Revision: 246628
URL: http://svnweb.freebsd.org/changeset/base/246628
Log:
find: Run when cwd cannot be opened, except with -execdir or -delete.
fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when
the current directo
Author: jilles
Date: Sun Feb 10 13:28:02 2013
New Revision: 246618
URL: http://svnweb.freebsd.org/changeset/base/246618
Log:
find: In -execdir ... {} +, only pass one file per invocation.
This is inefficient but ensures that -execdir ... {} + does not mix files
from different directories
Author: jilles
Date: Sun Feb 10 13:20:23 2013
New Revision: 246617
URL: http://svnweb.freebsd.org/changeset/base/246617
Log:
sigqueue(2): Fix typo (EEPERM -> EPERM).
MFC after:3 days
Modified:
head/lib/libc/sys/sigqueue.2
Modified: head/lib/libc/sys/sigqueue.2
==
Author: jilles
Date: Thu Feb 7 22:42:33 2013
New Revision: 246522
URL: http://svnweb.freebsd.org/changeset/base/246522
Log:
sh: Simplify mksyntax and make it fit for cross-compiling.
Now it outputs fixed files, which use constants provided by the C standard
library to determine appropria
Author: jilles
Date: Thu Feb 7 21:24:10 2013
New Revision: 246507
URL: http://svnweb.freebsd.org/changeset/base/246507
Log:
sh: Fix a comment.
Modified:
head/bin/sh/parser.h
Modified: head/bin/sh/parser.h
==
--- hea
Author: jilles
Date: Tue Feb 5 22:54:09 2013
New Revision: 246371
URL: http://svnweb.freebsd.org/changeset/base/246371
Log:
sh: Do not test for digit_contig in mksyntax.
ISO/IEC 9899:1999 (E) 5.2.1p3 guarantees that the values of the characters
0123456789 are contiguous.
The generat
Author: jilles
Date: Sun Feb 3 15:54:57 2013
New Revision: 246288
URL: http://svnweb.freebsd.org/changeset/base/246288
Log:
sh: Expand here documents in the current process.
Expand here documents at the same point other redirections are expanded but
use a non-fork subshell environment (l
Author: jilles
Date: Thu Jan 31 22:10:57 2013
New Revision: 246167
URL: http://svnweb.freebsd.org/changeset/base/246167
Log:
sh: Prefer our character classification functions to .
Modified:
head/bin/sh/miscbltin.c
head/bin/sh/mksyntax.c
Modified: head/bin/sh/miscbltin.c
===
Author: jilles
Date: Thu Jan 31 21:50:44 2013
New Revision: 246162
URL: http://svnweb.freebsd.org/changeset/base/246162
Log:
sh: Show negated commands (!) in jobs output.
Modified:
head/bin/sh/jobs.c
Modified: head/bin/sh/jobs.c
===
+
> +#include
> +#include
> +#include
> +#include
> +#include
> +
> [snip]
> +void
> +test_autoalloc ()
> +{
> + /*
> + * let fmemopen allocate the buffer
> + */
> +
> + char str[] = "A quick test";
> + FILE *fp;
&
Author: jilles
Date: Sun Jan 20 21:28:05 2013
New Revision: 245698
URL: http://svnweb.freebsd.org/changeset/base/245698
Log:
sh: Move some stackmarks to fix high memory usage in some loops.
If a loop contained certain commands (such as redirected compound commands),
the temporary memory f
Author: jilles
Date: Sun Jan 20 12:44:50 2013
New Revision: 245689
URL: http://svnweb.freebsd.org/changeset/base/245689
Log:
sh: Remove mkinit's initialization routine.
Instead, call the only init function left directly from main().
Modified:
head/bin/sh/TOUR
head/bin/sh/init.h
head/
Author: jilles
Date: Sat Jan 19 22:12:08 2013
New Revision: 245676
URL: http://svnweb.freebsd.org/changeset/base/245676
Log:
sh: Replace an mkinit use with an initialization.
Modified:
head/bin/sh/input.c
Modified: head/bin/sh/input.c
=
Author: jilles
Date: Fri Jan 18 23:08:40 2013
New Revision: 245630
URL: http://svnweb.freebsd.org/changeset/base/245630
Log:
libthr: Always use the threaded rtld lock implementation.
The threaded rtld lock implementation is faster even in the single-threaded
case because it postpones sign
On Mon, Jan 14, 2013 at 01:38:51PM -0500, Eitan Adler wrote:
> On 14 January 2013 11:40, Jilles Tjoelker wrote:
> > Author: jilles
> > Date: Mon Jan 14 16:40:50 2013
> > New Revision: 245426
> > URL: http://svnweb.freebsd.org/changeset/base/245426
> > Log:
>
Author: jilles
Date: Mon Jan 14 16:40:50 2013
New Revision: 245426
URL: http://svnweb.freebsd.org/changeset/base/245426
Log:
sh: Simplify cd-hash interaction.
Instead of rechecking relative paths for all hashed utilities after a cd,
track if any utility in cmdtable depends on a relative p
Author: jilles
Date: Mon Jan 14 12:20:55 2013
New Revision: 245422
URL: http://svnweb.freebsd.org/changeset/base/245422
Log:
sh: Pass $? to command substitution containing compound/multiple commands.
Example:
false; echo $(echo $?; :)
Added:
head/tools/regression/bin/sh/expansion/cmd
Author: jilles
Date: Sun Jan 13 22:35:51 2013
New Revision: 245392
URL: http://svnweb.freebsd.org/changeset/base/245392
Log:
sh: Add testcase that $? is preserved into a simple command substitution.
The test builtins/trap6.0 already uses this but having it separate eases
diagnosis if this
Author: jilles
Date: Sun Jan 13 19:39:13 2013
New Revision: 245383
URL: http://svnweb.freebsd.org/changeset/base/245383
Log:
sh: Add some testcases related to subshells.
These failed in earlier attempts to execute more subshells without forking.
The patches are uncommitted.
Added:
head
Author: jilles
Date: Sun Jan 13 19:26:33 2013
New Revision: 245382
URL: http://svnweb.freebsd.org/changeset/base/245382
Log:
sh: Fix crash when parsing '{ } &'.
MFC after:1 week
Added:
head/tools/regression/bin/sh/parser/empty-braces1.0 (contents, props
changed)
Modified:
head/b
Author: jilles
Date: Sun Jan 13 19:19:40 2013
New Revision: 245381
URL: http://svnweb.freebsd.org/changeset/base/245381
Log:
sh: Don't lose $? when backquoted command ends with semicolon or newline.
An empty simple command was added and overwrote the exit status with 0.
This affects `.
will actively break incorrect programs that pass too
high size parameters to strlcpy but strings that fit in the actual
buffer. This might threaten the stability of head.
If you want this, it makes more sense to create a new function.
--
Jilles Tjoelker
__
Author: jilles
Date: Tue Jan 1 12:48:24 2013
New Revision: 244924
URL: http://svnweb.freebsd.org/changeset/base/244924
Log:
sh: Fix a Subversion property.
Test scripts should have keywords; only pure output that must match exactly
should have keywords disabled.
Modified:
Directory Prope
d by anything.
The comment in pw_util.c gives the impression that this is vital for
security; in fact, chpass does not keep the password file locked across
a user's editor. However, the idea of setting close-on-exec on this file
descriptor is good. Please add |O_CLOEXEC to the flopen() flags in both
Author: jilles
Date: Thu Dec 27 13:21:37 2012
New Revision: 244734
URL: http://svnweb.freebsd.org/changeset/base/244734
Log:
test(1): Document == alias for =.
Reviewed by: gjb
Requested by: gjb
MFC after:1 week
Modified:
head/bin/test/test.1
Modified: head/bin/test/test.1
=
Author: jilles
Date: Tue Dec 25 14:17:09 2012
New Revision: 244682
URL: http://svnweb.freebsd.org/changeset/base/244682
Log:
sh: Prefer strsignal() to accessing sys_siglist directly.
Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsig
meters in the loop.
An alternative is to append the new list to the old one and to use a
saved copy of $# to remove the old elements afterwards.
It would be nice to store the arguments in a variable but that is not
possible because all characters are valid in pathnames, except the null
character which
hat
called sysctl(8) with strings starting with a quote.
On the positive side this allows setting sysctl values starting with
whitespace, but perhaps the isspace loop above it should be removed as
well so that can be done without adding quotes. It seems inappropriate
for sysctl.conf in particular since
Author: jilles
Date: Mon Dec 17 10:38:51 2012
New Revision: 244350
URL: http://svnweb.freebsd.org/changeset/base/244350
Log:
libc/iconv: Fix race condition with setting FD_CLOEXEC.
A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and a
Author: jilles
Date: Wed Dec 12 22:01:10 2012
New Revision: 244162
URL: http://svnweb.freebsd.org/changeset/base/244162
Log:
sh: Detect and flag write errors on stdout in builtins.
If there is a write error on stdout, a message will be printed (to stderr)
and the exit status will be chang
Author: jilles
Date: Tue Dec 11 22:52:56 2012
New Revision: 244126
URL: http://svnweb.freebsd.org/changeset/base/244126
Log:
libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
Modified:
head/lib/libc/locale/collate.c
head/lib/libc/locale/setrune
Author: jilles
Date: Mon Dec 10 17:56:51 2012
New Revision: 244092
URL: http://svnweb.freebsd.org/changeset/base/244092
Log:
libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
Modified:
head/lib/libc/gen/fmtmsg.c
head/lib/libc/gen/getcap.c
hea
Author: jilles
Date: Sat Dec 8 19:42:15 2012
New Revision: 244038
URL: http://svnweb.freebsd.org/changeset/base/244038
Log:
libc: Add a missing header to a test program.
Usage of dup(), mkstemp() and unlink() needs .
Modified:
head/tools/regression/lib/libc/stdio/test-perror.c
Modified
601 - 700 of 1237 matches
Mail list logo