Re: Trying to use /bin/sh

2013-09-27 Thread Jilles Tjoelker
in ~/.login_conf. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: [kde-freebsd] virtualbox file dialog problem

2013-08-28 Thread Jilles Tjoelker
if it is called from a process with issetugid() true. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Importing tradcpp (traditional (KR-style) C macro preprocessor) into base?

2013-06-11 Thread Jilles Tjoelker
it if it depends on a traditional cpp port. A further point of confusion is that things that want a traditional cpp in fact want an equivalent of gcpp -traditional. This is in fact the point of tradcpp and why the old preprocessors do not work. -- Jilles Tjoelker

Re: /bin/sh = STDIN functions, var scope messing

2013-05-30 Thread Jilles Tjoelker
jobs | cat work, that can also be explained using this rule. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: find -delete broken, or just used improperly?

2013-05-24 Thread Jilles Tjoelker
On Tue, May 21, 2013 at 11:06:39AM -0400, John Baldwin wrote: On Monday, May 20, 2013 5:47:31 pm Jilles Tjoelker wrote: The below patch allows deleting the pathname given to find itself: Index: usr.bin/find/function.c

Re: find -delete broken, or just used improperly?

2013-05-20 Thread Jilles Tjoelker
(1, -delete: %s: relative path potentially not safe, entry-fts_accpath); -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail

Re: Managing userland data pointers in kqueue/kevent

2013-05-19 Thread Jilles Tjoelker
is userland-kernel and the other kernel-userland, they could for neatness reuse the same bit field. I think it would be consistent with other EV_* to use the same name and value for both. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Re: SystemV IPC. Segment info

2013-04-30 Thread Jilles Tjoelker
to it. Alternatively, you may find a different way to get rid of your stale worker processes. For example, before invoking shmctl(IPC_RMID), set a flag inside the memory segment that all workers should exit and activate whatever mechanism you use for telling the workers that they need to do something. -- Jilles

Re: Some improvements to rm(1)

2013-04-26 Thread Jilles Tjoelker
not even affect the exit status and all files not under the mount point are removed. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

Re: Some improvements to rm(1)

2013-04-26 Thread Jilles Tjoelker
-execdir. I'm not entirely sure about this because the rm(1) patch is simple and the new syntax is fairly clear. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send

Re: [patch] pipe2

2013-04-22 Thread Jilles Tjoelker
On Mon, Apr 22, 2013 at 08:31:18PM +0300, Konstantin Belousov wrote: On Sun, Apr 21, 2013 at 11:02:43PM +0200, Jilles Tjoelker wrote: On Sat, Apr 20, 2013 at 12:48:39AM +0200, Jilles Tjoelker wrote: I'm also working on pipe2() (using linuxulator work) and dup3() (patch from Jukka

[patch] pipe2

2013-04-21 Thread Jilles Tjoelker
On Sat, Apr 20, 2013 at 12:48:39AM +0200, Jilles Tjoelker wrote: I'm also working on pipe2() (using linuxulator work) and dup3() (patch from Jukka A. Ukkonen). This is an implementation of pipe2. As with the accept4 patch, make sysent needs to be run in sys/kern and sys/compat/freebsd32

[patch] accept4

2013-04-19 Thread Jilles Tjoelker
2e410d9260d12328b689b0938e09d09649b0460a Author: Jilles Tjoelker jil...@stack.nl Date: Sat Mar 30 21:44:14 2013 +0100 Add accept4() system call. diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index fef0f3c..105f469 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys

Re: GSOC: Qt front-end for freebsd-update

2013-04-14 Thread Jilles Tjoelker
. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: GSOC 2013 project Kernel Size Reduction for Embedded System

2013-04-08 Thread Jilles Tjoelker
smaller. The proposal should list concrete parts. * Find variables and functions that are required only during kernel initialization, place them in a special section and add this section to the free memory pool after kernel initialization. -- Jilles Tjoelker

Re: Fwd: Where does FreeBSD tr -C differ from tr -c?

2013-04-07 Thread Jilles Tjoelker
things about collation order. You may not have detected this because FreeBSD does not implement LC_COLLATE for multibyte locales yet. PS: Who wrote tr -C and how can I contact the author? You can read the Subversion logs but people may no longer be around. -- Jilles Tjoelker

Re: close(2) while accept(2) is blocked

2013-04-05 Thread Jilles Tjoelker
retried) except when lingering on close (SO_LINGER) so this should be fairly safe. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

Re: close(2) while accept(2) is blocked

2013-03-28 Thread Jilles Tjoelker
implementation such as in FreeBSD 9.0 or newer and used properly, it allows avoiding the resource leak that may happen when calling longjmp() or pthread_exit() in a signal handler just after accept() has created a new socket. -- Jilles Tjoelker ___ freebsd-hackers

Re: [patch] SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC

2013-03-19 Thread Jilles Tjoelker
On Mon, Mar 18, 2013 at 10:59:57PM +0200, Konstantin Belousov wrote: On Sun, Mar 17, 2013 at 10:23:53PM +0100, Jilles Tjoelker wrote: Here are some more modifications to allow creating file descriptors with close-on-exec set. Like in linux/glibc, SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed

[patch] SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC

2013-03-17 Thread Jilles Tjoelker
) { + (void) fo_ioctl(fp1, FIONBIO, fflag, td-td_ucred, td); + (void) fo_ioctl(fp2, FIONBIO, fflag, td-td_ucred, td); + } fdrop(fp1, td); fdrop(fp2, td); return (0); -- Jilles Tjoelker ___ freebsd

Re: [patch] statfs does not detect -t nullfs -o union as a union mount

2013-03-01 Thread Jilles Tjoelker
On Thu, Feb 28, 2013 at 12:21:44AM +0200, Konstantin Belousov wrote: On Wed, Feb 27, 2013 at 10:31:42PM +0100, Jilles Tjoelker wrote: While testing recent changes to opendir(), I noticed that fstatfs() does not return the MNT_UNION flag for a -t nullfs -o union mount. As a result, opendir

[patch] statfs does not detect -t nullfs -o union as a union mount

2013-02-27 Thread Jilles Tjoelker
work correctly in this regard. The below patch passes through just the MNT_UNION flag of the nullfs mount itself. Perhaps more flags should be passed through. commit fce32a779af4eb977c9b96feb6e4f811d89f2881 Author: Jilles Tjoelker jil...@stack.nl Date: Sat Feb 23 22:22:39 2013 +0100 nullfs

Re: Request for review, time_pps_fetch() enhancement

2013-02-09 Thread Jilles Tjoelker
-timeout.tv_sec == -1) { + continue; + } else if (err != 0) { + return (err); + } + } + } -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list

Re: use after free in grep?

2012-12-20 Thread Jilles Tjoelker
() fails. A smarter internal interface to the hash table would avoid freeing and reallocating hash table entries here (which might fail). -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: Fix overlinking in base aka import pkgconf

2012-12-16 Thread Jilles Tjoelker
is some form of philosophical correctness. For ports this may be a good way to keep static linking working after fixing overlinking caused by libtool's dependency_libs in .la files. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Incorrect use of posix_memalign() (was: Re: svn commit: r243405 - in stable/9: include lib/libc/stdlib)

2012-11-25 Thread Jilles Tjoelker
); with error checking against some_ptr instead of error. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

[patch] rtld: fix fd leak with parallel dlopen and fork/exec

2012-11-04 Thread Jilles Tjoelker
, pthread_create); filestat_loop(); return 0; } -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-21 Thread Jilles Tjoelker
On Sun, Oct 14, 2012 at 04:55:07PM -0400, Eitan Adler wrote: On 14 October 2012 10:42, Jilles Tjoelker jil...@stack.nl wrote: Because C99 does not specify threading, it allows these transformations. In C11, they are forbidden. Passing -pthread disables them as well. Is the man page wrong

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-14 Thread Jilles Tjoelker
is written concurrently. Because C99 does not specify threading, it allows these transformations. In C11, they are forbidden. Passing -pthread disables them as well. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org

Re: Change vfork() to posix_spawn()?

2012-09-14 Thread Jilles Tjoelker
frameworks such as PAM which are not async-signal-safe and certainly not vfork-safe. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

Re: [patch] libc: Do not export .cerror

2012-08-31 Thread Jilles Tjoelker
On Tue, Aug 28, 2012 at 02:03:22PM +0300, Konstantin Belousov wrote: On Sat, Aug 25, 2012 at 12:16:55AM +0200, Jilles Tjoelker wrote: Not exporting .cerror causes it to be jumped to directly instead of via the PLT. The below patch is for i386 only and also takes advantage of .cerror's

Re: system() using vfork() or posix_spawn() and libthr

2012-08-26 Thread Jilles Tjoelker
On Sun, Aug 19, 2012 at 03:26:36PM +0300, Konstantin Belousov wrote: On Fri, Aug 17, 2012 at 06:08:47PM +0200, Jilles Tjoelker wrote: On Fri, Aug 17, 2012 at 03:43:12PM +0300, Konstantin Belousov wrote: On Fri, Aug 17, 2012 at 12:39:33AM +0200, Jilles Tjoelker wrote: On Thu, Aug 16, 2012

[patch] libc: Do not export .cerror

2012-08-24 Thread Jilles Tjoelker
be the return address. */ - jb 1f + jb HIDENAME(cerror) ret -1: - PIC_PROLOGUE - jmp PIC_PLT(HIDENAME(cerror)) END(syscall) .section .note.GNU-stack,,%progbits -- Jilles Tjoelker ___ freebsd-hackers

Re: system() using vfork() or posix_spawn() and libthr

2012-08-17 Thread Jilles Tjoelker
On Fri, Aug 17, 2012 at 03:43:12PM +0300, Konstantin Belousov wrote: On Fri, Aug 17, 2012 at 12:39:33AM +0200, Jilles Tjoelker wrote: On Thu, Aug 16, 2012 at 02:44:26PM +0300, Konstantin Belousov wrote: BTW, returning to Jilles proposal, can we call vfork() only for single-threaded parent

Re: system() using vfork() or posix_spawn() and libthr

2012-08-16 Thread Jilles Tjoelker
, the kernel could map caught signals to the default action for processes with P_PPWAIT (just like it does not stop such processes because of signals or TTY job control). -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread Jilles Tjoelker
/view.php?id=18 just requested the _Fork() function because an existing application deadlocked when calling fork() from a signal handler. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: system() using vfork() or posix_spawn() and libthr

2012-08-11 Thread Jilles Tjoelker
On Fri, Aug 10, 2012 at 10:16:04AM +0800, David Xu wrote: On 2012/08/09 18:56, Jilles Tjoelker wrote: On Mon, Aug 06, 2012 at 11:25:35AM +0300, Konstantin Belousov wrote: On Sun, Aug 05, 2012 at 11:54:32PM +0200, Jilles Tjoelker wrote: On Mon, Jul 30, 2012 at 01:53:03PM +0300, Konstantin

Re: system() using vfork() or posix_spawn() and libthr

2012-08-09 Thread Jilles Tjoelker
On Mon, Aug 06, 2012 at 11:25:35AM +0300, Konstantin Belousov wrote: On Sun, Aug 05, 2012 at 11:54:32PM +0200, Jilles Tjoelker wrote: On Mon, Jul 30, 2012 at 01:53:03PM +0300, Konstantin Belousov wrote: On Mon, Jul 30, 2012 at 12:24:08PM +0200, Jilles Tjoelker wrote: People sometimes use

Re: system() using vfork() or posix_spawn()

2012-08-05 Thread Jilles Tjoelker
On Mon, Jul 30, 2012 at 01:53:03PM +0300, Konstantin Belousov wrote: On Mon, Jul 30, 2012 at 12:24:08PM +0200, Jilles Tjoelker wrote: People sometimes use system() from large address spaces where it would improve performance greatly to use vfork() instead of fork(). A simple approach

system() using vfork() or posix_spawn()

2012-07-30 Thread Jilles Tjoelker
, oldsigblock, NULL); -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: [RFC] last(1) with security.bsd.see_other_uids support

2012-06-06 Thread Jilles Tjoelker
On Wed, Jun 06, 2012 at 01:20:12PM +0200, Pawel Jakub Dawidek wrote: On Tue, Jun 05, 2012 at 11:31:01PM +0200, Jilles Tjoelker wrote: Also, the attack surface of such a daemon may be smaller than that of a setuid/setgid program. Really? I don't see that. With current patch and setgid

Re: [RFC] last(1) with security.bsd.see_other_uids support

2012-06-05 Thread Jilles Tjoelker
for the user.) Also, the attack surface of such a daemon may be smaller than that of a setuid/setgid program. Alternatively, the daemon could be a setgid program that is spawned by the utmpx APIs when needed. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org

Re: mmap segmentation fault

2012-04-12 Thread Jilles Tjoelker
address. Try, for example, procstat -v $$ -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: a sysctl for process binary osreldate

2012-03-17 Thread Jilles Tjoelker
things in procstat do not have ps keywords. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: xargs short-circuit

2012-02-14 Thread Jilles Tjoelker
-c 'echo $*; echo exit 1' worker || echo $? 1 1 such that any non-0 exit code in a child process would cause xargs to stop processing. seems like this would be a nice feature to have. As per xargs(1), you can do this by having the command exit on a signal or with a value of 255. -- Jilles

Re: sem(4) lockup in python?

2012-02-05 Thread Jilles Tjoelker
that the old implementation is still present as well, for compatibility with old binaries. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

sh(1) vfork patch, with benchmarks

2012-01-25 Thread Jilles Tjoelker
an earlier version of this patch on some sort of ARM board and reports an improvement in boot time from 54 to 51 seconds, and a large difference in microbenchmarks. commit f55a350fa9c3792e10f93160a93d016a7bfdd630 Author: Jilles Tjoelker jil...@stack.nl Date: Mon May 30 00:31:45 2011 +0200 sh: Use

Re: sh(1) vfork patch, with benchmarks

2012-01-25 Thread Jilles Tjoelker
On Wed, Jan 25, 2012 at 11:54:46PM +0100, Jilles Tjoelker wrote: [snip] x micro-vfork-timings1-n + micro-vfork-timings1-y

Re: intent of tab-completion in /bin/sh in 9.0

2012-01-19 Thread Jilles Tjoelker
On Wed, Jan 18, 2012 at 08:46:18PM -0500, Matthew Story wrote: On Wed, Jan 18, 2012 at 5:16 PM, Jilles Tjoelker jil...@stack.nl wrote: POSIX itself has gradually adopted ksh features, so seeing more of them in future is not unlikely. Most of the new language features in 9.0 are either from

Re: intent of tab-completion in /bin/sh in 9.0

2012-01-18 Thread Jilles Tjoelker
-- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: ps -e without procfs(5)

2011-12-04 Thread Jilles Tjoelker
in the first place. Given that the AUXV information seems to be used by debuggers only anyway, I think it would be good to move it to p_candebug() now. The full virtual memory maps (KERN_PROC_VMMAP, procstat -v) are already under p_candebug(). -- Jilles Tjoelker

Re: ps -e without procfs(5)

2011-12-04 Thread Jilles Tjoelker
, on the other hand it also seems to be used by debuggers only. With stack ASLR, the address will not be the same for every process of the same ABI and will be sensitive information. Therefore I think this should be locked down too. -- Jilles Tjoelker ___ freebsd

Re: cron(8) mis-feature with @reboot long after system startup

2011-11-26 Thread Jilles Tjoelker
be stored in /var/run, which is cleared at boot. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: xlocale patch

2011-11-20 Thread Jilles Tjoelker
. The xlocale.h header can then be an empty file. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Does anyone use nscd?

2011-10-08 Thread Jilles Tjoelker
-2008 while the MSG_NOSIGNAL flag to send() is. It may be better to replace the write() call with send() with the MSG_NOSIGNAL flag and drop the setsockopt(). -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org

Re: Re[2]: Sharing device driver between kernel and user space

2011-09-23 Thread Jilles Tjoelker
case, except for named semaphores in 8.x and earlier.) Or if returning EBUSY is acceptable when the resource is in use by $whatever, maybe you just need a boolean variable. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Re: Mixing Asynchronous Network I/O and POSIX Threads

2011-09-18 Thread Jilles Tjoelker
a resync step that is expensive both in CPU and programmer time. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr

fdopendir() wrongly closes passed fd on error, union mess

2011-08-09 Thread Jilles Tjoelker
); - (void)_close(fd); errno = saved_errno; return (NULL); } -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

Re: eliminating a syscall on accept()+ioctl() combo

2011-08-02 Thread Jilles Tjoelker
you request non-blocking using their new accept4() call). Because this portability issue can be very subtle, I suggest not blindly relying on it. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo

Re: invalid argument in select() when peer socket is in FD_SET

2011-07-31 Thread Jilles Tjoelker
of microseconds in a struct timeval must be nonnegative and less than one million (likewise, the number of nanoseconds in a struct timespec must be nonnegative and less than 1000 million). FreeBSD checks this strictly in most functions. -- Jilles Tjoelker

[PATCH] [RFC] sh(1) vfork support

2011-06-13 Thread Jilles Tjoelker
to finish. * -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: tr A-Z a-z in locales other than C

2011-06-07 Thread Jilles Tjoelker
On Tue, Jun 07, 2011 at 04:24:43AM +0400, Andrey Chernov wrote: On Tue, Jun 07, 2011 at 12:41:05AM +0200, Jilles Tjoelker wrote: There is a related issue with ranges in regular expressions, glob and fnmatch (likewise unspecified by POSIX outside the POSIX locale), but this is less likely

Re: tr A-Z a-z in locales other than C

2011-06-07 Thread Jilles Tjoelker
of locale. That would be rather ugly. If tr a-z A-Z is supposed to be deceiving in some locales, then let it remain so unconditionally. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

tr A-Z a-z in locales other than C

2011-06-06 Thread Jilles Tjoelker
; - if (n 1) - mergesort(s-set, n, sizeof(*(s-set)), charcoll); + s-cnt = stopval - s-lastch + 1; + s-state = RANGE; + --s-lastch; return (1); } -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Re: int64_t and printf

2011-06-05 Thread Jilles Tjoelker
case of int64_t, it would seem that long long is better than intmax_t, as it is possibly shorter but still guaranteed large enough by C99, but there are objections against this that I do not understand. Also, note the format strings for size_t, %zu, and for ptrdiff_t, %td. -- Jilles Tjoelker

Re: [RFC] rcexecr: rcorder in parallel

2011-06-04 Thread Jilles Tjoelker
for processes that have already terminated. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Does FreeBSD have replacement for posix_fadvice() or fcntl(F_RDADVISE)?

2011-05-12 Thread Jilles Tjoelker
effect: it resets the state of the sequential access detection heuristic but does not disable it. The O_DIRECT open(2) flag has an effect similar to what POSIX_FADV_NOREUSE should do, except that it changes semantics by adding alignment restrictions. -- Jilles Tjoelker

Re: [LIBC] Modfied Version of sscanf

2011-05-01 Thread Jilles Tjoelker
bugs. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Basic UTF-8 support for sh(1)

2011-02-25 Thread Jilles Tjoelker
iconv(3) but as long as it is not unconditionally available in base or if it is not supposed to be used, the codepoints can be encoded in UTF-8 for UTF-8 locales, leaving other locales with question marks. -- Jilles Tjoelker Index: parser.h

Re: man 3 getopt char * const argv[] - is const wrong ?

2011-02-13 Thread Jilles Tjoelker
char *const [], other than via a cast. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Removing PATH=...%builtin... from sh

2010-12-25 Thread Jilles Tjoelker
: Missing POSIX commands found before PATH (regular builtins): newgrp -- Jilles Tjoelker Index: bin/sh/exec.c === --- bin/sh/exec.c (revision 216690) +++ bin/sh/exec.c (working copy) @@ -92,7 +92,6 @@ static struct tblentry

Re: libkvm: consumers of kvm_getprocs for non-live kernels?

2010-11-10 Thread Jilles Tjoelker
is not even used during build! So I guess I'm staring at dead code here, any kvm people around that can clue me in? It is a while ago that I last used this, but ps and fstat definitely worked on crashdumps, to some extent. /usr/sbin/crashinfo uses this. -- Jilles Tjoelker

Re: [PATCH] update to the latest libedit version and remove libreadline deps

2010-11-05 Thread Jilles Tjoelker
and is very simplistic, perhaps it is better to stub it out and not change sh. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers

Re: Space character in rc.conf variable

2010-10-30 Thread Jilles Tjoelker
the result in and using eval, extending setvar in some strange way or implementing another ksh93 extension, namerefs. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe

Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

2010-10-12 Thread Jilles Tjoelker
:)... local might be worth checking for as the original Bourne shell and ksh93 don't know it. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd

Re: Why I can't trace linux process's childs with truss?

2010-09-10 Thread Jilles Tjoelker
will need devel/linux_kdump from ports to decode the resulting ktrace.out. Alternatively, if you're familiar with dtrace, you could try that. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo

Re: ar(1) format_decimal failure is fatal?

2010-08-29 Thread Jilles Tjoelker
if the uid/gid fields are useful at all for ar archives. Ar archives are usually not extracted, and when they are, the current user's values seem good enough. The uid/gid also prevent exactly reproducible builds (together with the timestamp). -- Jilles Tjoelker

Re: tiny patch to prevent head from closing pipes

2010-08-29 Thread Jilles Tjoelker
not involve subversion? -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Help with some makefile hackery

2010-06-25 Thread Jilles Tjoelker
the output to a file only; a developer can use tail -f to follow the build if necessary. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd

Re: libc symbol versioning difficulties with iconv integration

2010-06-04 Thread Jilles Tjoelker
, everything goes fine. Any ideas? Patch is here: http://kovesdan.org/patches/iconv-libc.diff There is a .include bsd.lib.mk in iconv/Makefile.inc, what happens if you take that out? -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Re: /dev/null zero inside chroot for make release

2010-05-15 Thread Jilles Tjoelker
mknod(8). Only device nodes in devfs can be used to access devices. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr

Re: /dev/null zero inside chroot for make release

2010-05-13 Thread Jilles Tjoelker
) Or a jail ? (I dont really want that level of encapsulation ). Mount devfs in your chroot. Then use devfs(8) to limit what's visible in that particular devfs, if you want. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http

Re: [patch] [RFC] pathchk quiet flag

2010-04-27 Thread Jilles Tjoelker
On Mon, Apr 26, 2010 at 08:57:31PM +0300, Eitan Adler wrote: This path adds a -q flag to stop pathchk from outputting error messages but still return an error code. Why do you need this; can't you do something like pathconf -- $pathname 2/dev/null -- Jilles Tjoelker

libc NLS, NFS mounted /usr/local, DHCP, no default route causes hangs

2010-04-23 Thread Jilles Tjoelker
this be fixed in some other way? -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: libc NLS, NFS mounted /usr/local, DHCP, no default route causes hangs

2010-04-23 Thread Jilles Tjoelker
On Fri, Apr 23, 2010 at 04:17:36PM +0200, Jilles Tjoelker wrote: The changes to use NLS for strerror sometimes cause one of my virtual machines to deadlock. This virtual machine runs 9-CURRENT, acquires its IP address via DHCP (virtualbox host-only networking), has no default route and has

Re: System() returning ECHILD error on FreeBSD 7.2

2010-02-10 Thread Jilles Tjoelker
masks so the bad situation does not occur (note that the signal mask is inherited across pthread_create()) and calling fork/execve and managing the child process exit yourself. Note that POSIX does not require system() to be thread-safe. -- Jilles Tjoelker

Re: ps time field jumps backward

2010-02-07 Thread Jilles Tjoelker
= pthread_cancel(td); if (error != 0) errc(1, error, pthread_cancel); error = pthread_join(td, NULL); if (error != 0) errc(1, error, pthread_join); } return 0; } -- Jilles Tjoelker

Re: Unique process id (not pid) and accounting daemon

2010-01-29 Thread Jilles Tjoelker
in the process tree and find a matching one in the accounting file after it finishes. Am I looking in a right direction or should I try some other way? Thanks in advance. Have you looked at audit(4)? -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org

Re: Greetings... a patch I would like your comments on...

2010-01-22 Thread Jilles Tjoelker
. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: [PATCH] linprocfs dofilesystems

2010-01-10 Thread Jilles Tjoelker
with this change will be helpful. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: linprocfs Input/output error

2010-01-01 Thread Jilles Tjoelker
with the allocation of a buffer of that size using sbuf_new(9) (and so, malloc(9)). Some sort of limit seems appropriate, but MAXPHYS seems unrelated, and if the request is too long it should perhaps just truncate it. -- Jilles Tjoelker ___ freebsd-hackers

[PATCH] fts(3): allow FTS_LOGICAL without FTS_NOCHDIR

2010-01-01 Thread Jilles Tjoelker
write access) Question: why are the values for fts_flags in the public header file fts.h, even though they are supposedly private? In case the mailing list eats the patch, it is also available here: http://www.stack.nl/~jilles/unix/fts-logical-chdir.patch -- Jilles Tjoelker Index: include/fts.h

why does _PATH_STDPATH contain the current directory?

2009-12-23 Thread Jilles Tjoelker
. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

Re: Workaround for ntop as daemon, is it ok?

2009-11-27 Thread Jilles Tjoelker
will allow sharing the kqueue between the two processes. As long as the parent process exits quickly, or no tricks with file descriptor numbers are done, this is pretty safe. Another fix is to create the kqueue in the child process. -- Jilles Tjoelker

Re: CFR: Exceedingly minor fixes to libc

2009-11-13 Thread Jilles Tjoelker
], + acl_int-acl_cnt--; + bzero(acl_int-acl_entry[j], sizeof(struct acl_entry)); acl-ats_cur_entry = 0; -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing

Re: [patch] add pwait utility

2009-11-07 Thread Jilles Tjoelker
On Sat, Nov 07, 2009 at 03:01:36PM +0200, Kostik Belousov wrote: On Sat, Nov 07, 2009 at 11:28:32AM +0100, Gary Jennejohn wrote: On Fri, 6 Nov 2009 23:24:46 +0100 Jilles Tjoelker jil...@stack.nl wrote: I propose adding a small new utility to /usr/bin: pwait. Similar to the Solaris

Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH

2009-10-24 Thread Jilles Tjoelker
that errno should be used to check for error conditions (example: readdir). -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr

Re: semaphores between processes

2009-10-22 Thread Jilles Tjoelker
, but not in man pages or other documentation. Is there recommended way to do this? Apart from sysv semaphores, perhaps posix named semaphores (sem_open() etc). These require a 'kldload sem' on older versions though. -- Jilles Tjoelker ___ freebsd

Re: sigwait - differences between Linux FreeBSD

2009-10-09 Thread Jilles Tjoelker
). The SA_SIGINFO flag can only be set by setting a handler using sigaction(2). (Note, this does not mean that all signals are queued if SA_SIGINFO is set. It means that signals may not be queued if SA_SIGINFO is not set.) -- Jilles Tjoelker ___ freebsd

Re: Problem in bin/sh stripping the * character through ${expansion%}

2009-09-11 Thread Jilles Tjoelker
as the single star -- it's a weird way to escape the star in the patterns. This is indeed a good workaround. -- Jilles Tjoelker ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any

  1   2   >