svn commit: r250421 - head/lib/libc/gen

2013-05-09 Thread Jilles Tjoelker
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

svn commit: r250412 - head/lib/libc/gen

2013-05-09 Thread Jilles Tjoelker
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

svn commit: r250406 - head/lib/libc/gen

2013-05-09 Thread Jilles Tjoelker
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 =

svn commit: r250267 - head/bin/sh

2013-05-05 Thread Jilles Tjoelker
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

svn commit: r250231 - head/lib/libkvm

2013-05-04 Thread Jilles Tjoelker
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

svn commit: r250230 - head/lib/libkvm

2013-05-04 Thread Jilles Tjoelker
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 ==

svn commit: r250222 - head/tools/regression/bin/sh/builtins

2013-05-03 Thread Jilles Tjoelker
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

svn commit: r250214 - in head: bin/sh tools/regression/bin/sh/builtins

2013-05-03 Thread Jilles Tjoelker
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

svn commit: r250163 - head/sys/sys

2013-05-01 Thread Jilles Tjoelker
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 ===

svn commit: r250161 - head/lib/libc/sys

2013-05-01 Thread Jilles Tjoelker
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 =

svn commit: r250160 - in head/sys: compat/freebsd32 kern sys

2013-05-01 Thread Jilles Tjoelker
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

svn commit: r250159 - in head: include lib/libc/sys sys/compat/freebsd32 sys/kern

2013-05-01 Thread Jilles Tjoelker
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

svn commit: r250155 - in head/sys: compat/freebsd32 kern sys

2013-05-01 Thread Jilles Tjoelker
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

svn commit: r250154 - in head: lib/libc/sys lib/libthr lib/libthr/thread sys/compat/freebsd32 sys/kern sys/sys

2013-05-01 Thread Jilles Tjoelker
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

svn commit: r250102 - head/sys/kern

2013-04-30 Thread Jilles Tjoelker
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

Re: svn commit: r249859 - head/lib/libc/sys

2013-04-29 Thread Jilles Tjoelker
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

svn commit: r249985 - head/lib/libthr/thread

2013-04-27 Thread Jilles Tjoelker
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 ==

svn commit: r249984 - head/bin/sh

2013-04-27 Thread Jilles Tjoelker
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

svn commit: r249983 - head/usr.sbin/syslogd

2013-04-27 Thread Jilles Tjoelker
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.

svn commit: r249979 - head/lib/libc/sys

2013-04-27 Thread Jilles Tjoelker
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

svn commit: r249956 - head/lib/libc/gen

2013-04-26 Thread Jilles Tjoelker
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

Re: svn commit: r249859 - head/lib/libc/sys

2013-04-26 Thread Jilles Tjoelker
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

svn commit: r249859 - head/lib/libc/sys

2013-04-24 Thread Jilles Tjoelker
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

svn commit: r249739 - head/lib/libc/sys

2013-04-21 Thread Jilles Tjoelker
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

svn commit: r249644 - head/sys/kern

2013-04-19 Thread Jilles Tjoelker
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

svn commit: r249593 - head/lib/libc/gen

2013-04-17 Thread Jilles Tjoelker
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

Re: svn commit: r249566 - in head: lib/libc/gen sys/kern

2013-04-16 Thread Jilles Tjoelker
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

svn commit: r249471 - head/lib/libc/nls

2013-04-14 Thread Jilles Tjoelker
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

svn commit: r249425 - head/lib/libthr/thread

2013-04-12 Thread Jilles Tjoelker
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

svn commit: r249407 - in head: bin/sh tools/regression/bin/sh/execution

2013-04-12 Thread Jilles Tjoelker
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.

svn commit: r249235 - head/bin/sh

2013-04-07 Thread Jilles Tjoelker
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 ===

svn commit: r249233 - head/sys/kern

2013-04-07 Thread Jilles Tjoelker
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

svn commit: r249220 - head/tools/regression/bin/sh/builtins

2013-04-06 Thread Jilles Tjoelker
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

svn commit: r249219 - head

2013-04-06 Thread Jilles Tjoelker
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 =

Re: svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys

2013-04-06 Thread Jilles Tjoelker
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

Re: svn commit: r249035 - head/lib/libc/stdlib

2013-04-04 Thread Jilles Tjoelker
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"

svn commit: r249034 - head/bin/sh

2013-04-02 Thread Jilles Tjoelker
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

svn commit: r248987 - in head: lib/libc/gen tools/regression/lib/libc/gen

2013-04-01 Thread Jilles Tjoelker
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

svn commit: r248980 - head/bin/sh

2013-04-01 Thread Jilles Tjoelker
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

svn commit: r248951 - in head/sys: compat/linux kern sys

2013-03-31 Thread Jilles Tjoelker
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

svn commit: r248932 - head/sys/sys

2013-03-30 Thread Jilles Tjoelker
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

svn commit: r248803 - head/lib/libc/locale

2013-03-27 Thread Jilles Tjoelker
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

svn commit: r248774 - head/lib/libc/sys

2013-03-26 Thread Jilles Tjoelker
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

svn commit: r248692 - head/bin/sh

2013-03-24 Thread Jilles Tjoelker
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

svn commit: r248620 - head/etc/rc.d

2013-03-22 Thread Jilles Tjoelker
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

svn commit: r248593 - in head: lib/libc/sys sys/kern

2013-03-21 Thread Jilles Tjoelker
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

Re: svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys

2013-03-20 Thread Jilles Tjoelker
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

svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys

2013-03-19 Thread Jilles Tjoelker
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

svn commit: r248446 - head/usr.bin/find

2013-03-17 Thread Jilles Tjoelker
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

svn commit: r248349 - in head: bin/sh tools/regression/bin/sh/builtins

2013-03-15 Thread Jilles Tjoelker
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

svn commit: r248252 - head/lib/libc/net

2013-03-13 Thread Jilles Tjoelker
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

svn commit: r247720 - in head: bin/sh tools/regression/bin/sh/builtins

2013-03-03 Thread Jilles Tjoelker
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

svn commit: r247716 - head

2013-03-03 Thread Jilles Tjoelker
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 ===

Re: svn commit: r247683 - head/lib/libedit

2013-03-03 Thread Jilles Tjoelker
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 >

svn commit: r247713 - head/lib/libedit

2013-03-03 Thread Jilles Tjoelker
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

Re: svn commit: r247683 - head/lib/libedit

2013-03-03 Thread Jilles Tjoelker
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

svn commit: r247619 - head/sys/fs/nullfs

2013-03-02 Thread 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

Re: svn commit: r247274 - in head: bin/test tools/regression/bin/test

2013-03-01 Thread Jilles Tjoelker
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

Re: svn commit: r247274 - in head: bin/test tools/regression/bin/test

2013-02-25 Thread Jilles Tjoelker
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

svn commit: r247236 - head/lib/libc/gen

2013-02-24 Thread Jilles Tjoelker
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

svn commit: r247206 - in head: bin/sh tools/regression/bin/sh/builtins

2013-02-23 Thread Jilles Tjoelker
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

svn commit: r247190 - head/tools/regression/bin/sh/builtins

2013-02-23 Thread Jilles Tjoelker
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

svn commit: r247013 - head/bin/sh

2013-02-19 Thread Jilles Tjoelker
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

svn commit: r246952 - head/lib/libc/stdio

2013-02-18 Thread Jilles Tjoelker
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

Re: svn commit: r246824 - head/lib/libc/stdio

2013-02-16 Thread Jilles Tjoelker
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

svn commit: r246824 - head/lib/libc/stdio

2013-02-15 Thread Jilles Tjoelker
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 ===

svn commit: r246641 - head/lib/libc/gen

2013-02-10 Thread Jilles Tjoelker
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

svn commit: r246628 - head/usr.bin/find

2013-02-10 Thread Jilles Tjoelker
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

svn commit: r246618 - head/usr.bin/find

2013-02-10 Thread Jilles Tjoelker
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

svn commit: r246617 - head/lib/libc/sys

2013-02-10 Thread Jilles Tjoelker
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 ==

svn commit: r246522 - head/bin/sh

2013-02-07 Thread Jilles Tjoelker
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

svn commit: r246507 - head/bin/sh

2013-02-07 Thread Jilles Tjoelker
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

svn commit: r246371 - head/bin/sh

2013-02-05 Thread Jilles Tjoelker
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

svn commit: r246288 - head/bin/sh

2013-02-03 Thread Jilles Tjoelker
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

svn commit: r246167 - head/bin/sh

2013-01-31 Thread Jilles Tjoelker
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 ===

svn commit: r246162 - head/bin/sh

2013-01-31 Thread Jilles Tjoelker
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 ===

Re: svn commit: r246120 - in head: include lib/libc/stdio tools/regression/lib/libc/stdio

2013-01-30 Thread Jilles Tjoelker
+ > +#include > +#include > +#include > +#include > +#include > + > [snip] > +void > +test_autoalloc () > +{ > + /* > + * let fmemopen allocate the buffer > + */ > + > + char str[] = "A quick test"; > + FILE *fp; &

svn commit: r245698 - head/bin/sh

2013-01-20 Thread Jilles Tjoelker
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

svn commit: r245689 - head/bin/sh

2013-01-20 Thread Jilles Tjoelker
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/

svn commit: r245676 - head/bin/sh

2013-01-19 Thread Jilles Tjoelker
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 =

svn commit: r245630 - head/lib/libthr/thread

2013-01-18 Thread Jilles Tjoelker
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

Re: svn commit: r245426 - head/bin/sh

2013-01-14 Thread Jilles Tjoelker
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: >

svn commit: r245426 - head/bin/sh

2013-01-14 Thread Jilles Tjoelker
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

svn commit: r245422 - in head: bin/sh tools/regression/bin/sh/expansion

2013-01-14 Thread Jilles Tjoelker
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

svn commit: r245392 - head/tools/regression/bin/sh/expansion

2013-01-13 Thread Jilles Tjoelker
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

svn commit: r245383 - head/tools/regression/bin/sh/execution

2013-01-13 Thread Jilles Tjoelker
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

svn commit: r245382 - in head: bin/sh tools/regression/bin/sh/parser

2013-01-13 Thread Jilles Tjoelker
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

svn commit: r245381 - in head: bin/sh tools/regression/bin/sh/expansion

2013-01-13 Thread Jilles Tjoelker
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 `.

Re: svn commit: r245036 - head/sys/kern

2013-01-04 Thread Jilles Tjoelker
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 __

svn commit: r244924 - head/tools/regression/bin/sh/errors

2013-01-01 Thread 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

Re: svn commit: r244735 - head/lib/libutil

2012-12-27 Thread Jilles Tjoelker
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

svn commit: r244734 - head/bin/test

2012-12-27 Thread Jilles Tjoelker
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 =

svn commit: r244682 - head/bin/sh

2012-12-25 Thread Jilles Tjoelker
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

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-19 Thread Jilles Tjoelker
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

Re: svn commit: r244198 - in head: etc/rc.d sbin/sysctl

2012-12-17 Thread Jilles Tjoelker
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

svn commit: r244350 - head/lib/libc/iconv

2012-12-17 Thread Jilles Tjoelker
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

svn commit: r244162 - in head: bin/sh tools/regression/bin/sh/errors

2012-12-12 Thread Jilles Tjoelker
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

svn commit: r244126 - head/lib/libc/locale

2012-12-11 Thread Jilles Tjoelker
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

svn commit: r244092 - head/lib/libc/gen

2012-12-10 Thread Jilles Tjoelker
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

svn commit: r244038 - head/tools/regression/lib/libc/stdio

2012-12-08 Thread Jilles Tjoelker
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

<    2   3   4   5   6   7   8   9   10   11   >