hy not allow using it. On the
other hand, if we can replace it with stubs 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/list
ocs is probably called on a dead kernel 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/
completeness one command that should really be a builtin or
otherwise magic:
Missing POSIX commands found before PATH (regular builtins):
newgrp
--
Jilles Tjoelker
Index: bin/sh/exec.c
===
--- bin/sh/exec.c (revision 216690)
+++ bin/
o char *optarg.
2. Many programs declare main's second argument as char *argv[] which
cannot be converted to const char *const [], other than via a cast.
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/
onverted using 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
I
rror if the string is too long. Silent
truncation might invalidate security checks done elsewhere and can lead
to hard-to-diagnose 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"
as little 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
n.
To avoid this, use waitpid(-1, ...) and maintain more tracking 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"
sting to a type such as intmax_t or uintmax_t for
which a constant format string is available (%jd/%ju). In the particular
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 thi
&cnt, (const void *)&(s->lastch)) >=
0 &&
- charcoll((const void *)&cnt, (const void *)&stopval) <= 0)
- *p++ = cnt;
- *p = OOBCH;
- n = p - s->set;
-
- s->cnt = 0;
-
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
&
es... TR_LANG, TR_LC_ALL, TR_LC_CTYPE and
> TR_LC_COLLATE. done that way, things could be set in /etc/make.conf (or
> sys.mk), not need any patching, and not interfere with other uses of
> locale.
That would be rather ugly.
If tr a-z A-Z is supposed to be deceiving in
lstr;
+ jp->foreground = 1;
+#if JOBS
+ setcurjob(jp);
+#endif
+ }
+ INTON;
+ TRACE(("In parent shell: child = %d\n", (int)pid));
+ return pid;
+}
+
+
/*
* Wait for job 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"
NULL, /* not interested in write */
> (fd_set *) NULL, /* ...or exceptions */
> &tv);/* timeout */
The number of microseconds in a struct timeval must be nonnegative and
less than one million (likewise, the number of nanoseconds in a struct
times
socket is and in fact Linux always makes the new socket blocking
(unless 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-ha
;
free(dirp);
- (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 ma
hen it
overflows you need 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 mai
his is unlike the userland sem_post(3) and friends
which only require a single atomic op in the uncontested 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 T
d be fixed.
By the way, SO_NOSIGPIPE is not in POSIX.1-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@freebs
secmp_l()
is in like strcasecmp(). This appears more sensible to me.
The 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"
ure, the @reboot cron script wont
> run (since the said file still exists...).
The file can 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"
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 Tjoel
is does
> not look like sensitive information, 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 b
rg/pipermail/freebsd-arch/2011-December/011976.html
--
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"
On Wed, Jan 18, 2012 at 08:46:18PM -0500, Matthew Story wrote:
> On Wed, Jan 18, 2012 at 5:16 PM, Jilles Tjoelker 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
> >
een kind enough to try 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
Date: Mon May 30 00:31:45 2011 +0200
On Wed, Jan 25, 2012 at 11:54:46PM +0100, Jilles Tjoelker wrote:
> [snip]
> x micro-vfork-timings1-n
> + micro-vfork-t
is not a no-op because it tells the kernel to allow for use
from multiple processes.
Note that the old implementation is still present as well, for
compatibility with old binaries.
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://l
command exit on a signal
or with a value of 255.
--
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"
ny of the newer
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"
ly want to map something there, you will have to move your code
somewhere else or manipulate your executable to contain a suitable
memory area at the required address.
Try, for example,
procstat -v $$
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org
tly, only 16 groups can be
queried. Therefore the daemon cannot check the process credential for
the groups but will have to check the group database for the user.)
Also, the attack surface of such a daemon may be smaller than that of a
setuid/setgid progr
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 c
+ posix_spawnattr_destroy(&attr);
(void)_sigaction(SIGINT, &intact, NULL);
(void)_sigaction(SIGQUIT, &quitact, NULL);
(void)_sigprocmask(SIG_SETMASK, &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"
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()
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 wro
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, Ju
arlier report http://austingroupbugs.net/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/mailma
hich signals are affected (such as libc). Alternatively, 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
___
freebs
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() onl
upon return; the word must 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
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 wro
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 al
uid() call itself will set
the issetugid flag to true if it changed anything, it does not affect
the ability to debug before exec.
More general privilege dropping frequently involves frameworks such as
PAM which are not async-signal-safe and certainly not vfork-safe.
--
Jilles Tjoelker
and d at once. This causes a race condition if p->d 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
On Sun, Oct 14, 2012 at 04:55:07PM -0400, Eitan Adler wrote:
> On 14 October 2012 10:42, Jilles Tjoelker 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
(wpid == -1)
err(1, "waitpid");
if (status != 0)
errx(1, "sh -c failed");
}
}
int
main(int argc, char *argv[])
{
pthread_t td;
int error;
if (argc != 2)
{
fprintf(std
d of posix_memalign()
some_ptr = aligned_alloc(aln, sz);
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 uns
here is not much need to
run an old base binary against newer base libraries. Apart from that the
only advantage 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.
--
m not sure if hash_table_del() will already free ptr.
Yes, and add it back if realloc() fails.
A smarter internal interface to the hash table would avoid freeing and
reallocating hash table entries here (which might fail).
--
Jilles Tjoelker
___
freebs
s by multiple threads
defined either, adding it here only seems to slow down the code
(potentially).
> > + err = tsleep(pps, PCATCH, "ppsfch", timo);
> > + if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) {
> >
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
Date: Sat Feb 23 22:22:39 2013 +0100
nullfs: Preserve the
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.
ketops);
+ finit(fp2, FREAD | FWRITE | fflag, DTYPE_SOCKET, fp2->f_data,
+ &socketops);
+ if ((fflag & FNONBLOCK) != 0) {
+ (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-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
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_NONB
ead out of accept(2) (at least without resorting to
> signals).
Pthread cancellation works better than raw signals for this use case. In
a proper implementation such as in FreeBSD 9.0 or newer and used
properly, it allows avoiding the resource leak that may happen
return (0);
}
A blocking accept (and some other operations) is waiting on
&so->so_timeo. Once it wakes up, it will detect the SBS_CANTRCVMORE bit.
A spurious wakeup on so->so_timeo appears harmless (sleep retried)
except when lingering on close (SO_LINGER) so this should be fairly
safe
new characters from time
to time and our tables seem to be updated very rarely.
POSIX also says 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 th
ed but seem big for what they do
for you, and try to make them 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
UIs, perhaps a pkgng GUI is more interesting.
--
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"
).
commit 2e410d9260d12328b689b0938e09d09649b0460a
Author: Jilles Tjoelker
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/Makefile.inc
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/fre
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()
using find -x DIR -delete ?
There will be an error message 'Device busy' about attempting to delete
the mount point but this does not even affect the exit status and all
files not under the mount point are removed.
--
Jilles Tjoelker
_
e primary is safe like -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/fre
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 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"
may add (nchanges entries are required for EV_ERROR leaving
nchanges for returning other events).
> It is not required that these two flags have distinct values; since
> one is userland->kernel and the other kernel->userland, they could for
> neatness reuse the same bit field.
path, '/') != NULL)
+ if (entry->fts_level > FTS_ROOTLEVEL &&
+ strchr(entry->fts_accpath, '/') != NULL)
errx(1, "-delete: %s: relative path potentially not safe",
entry->fts_accpath);
--
Jilles Tjo
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/
ch execute the
last command in a pipeline in the current shell environment.
If things like jobs | cat work, that can also be explained using this
rule.
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/
users in base that cannot be fixed).
The "fix" for imake is probably not to use it. Ports that need imake can
continue to use 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 "
the -P behaviour by default (you need -L to make
it use $PWD).
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
does not use $PWD, it returns a pathname without symlinks.
So that would lead to the original behaviour.
A better way could be to use $PWD if it is set and an absolute logical
pathname referring to the current directory, as in src/bin/pwd/pwd.c .
--
Jilles Tjoelker
_
unning a devfs (I'm not currently)
> 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-h
This is deprecated as of FreeBSD 5.0 and does not work at all as of
FreeBSD 6.0, see 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/li
the iconv
> code. If I just unhook the iconv part fromt he build, everything goes
> fine. Any ideas?
> Patch is here: http://kovesdan.org/patches/iconv-libc.diff
There is a .include in iconv/Makefile.inc, what happens
if you take that out?
--
Jilles Tjoelker
___
ut this is fairly complicated.
The issue can be sidestepped entirely by sending 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/ma
(if any) was behind this choice? Would anything break
> if it was bumped up to a larger size? Are there other options for a
> workaround in my AFS environment?
I wonder if the uid/gid fields are useful at all for ar archives. Ar
archives are usually not extracted, and when they are
ust a 5
> > minute hack in order to see if people find the idea useful or not.
> > ;)
> Can you give an example of usefulness that does 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"
/dev/video0 device, created
> by webcamd.
Try using ktrace instead of truss. You 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
_
ement. There's no restriction
> that says you have to put your variable declarations at the beginning
> of a block (like in C -- even if only within a superficial block { in
> the middle of nowhere } ... like that).
> Meanwhile, in Perl, it's quite
well, like
ifconfig_wlan0=(ssid "SSID WITH SPACE" dhcp)
but then changed some more such that "DHCP" can be used as SSID.
Array support would add a fair bit of code to sh, and even then it will
remain fairly limited and clumsy. For example, an array can only be
returned from a
of ITIMER_REAL / SIGALRM?
This does not fix the inherent problem.
Also, given your use of signals in the first place, your application
must be single threaded. This means the ITIMER_VIRTUAL timer does not
run while semop(2) is waiting.
--
Jilles Tjoelker
___
Linux's
O_NOATIME does not update any times at all (this speeds up things).
Anyway, O_NOATIME (only for root/owner) seems a useful feature.
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/free
ro of=/dev/ad1 bs=512 count=79
> dd if=/dev/zero of=/dev/ad2 bs=512 count=79
gmirror and various other geom modules store their metadata on the last
sector(s) of the drive, so you need to wipe that too.
--
Jilles Tjoelker
___
freebsd-hackers@freeb
annoyed by seeing silly 'sh -c blah' processes
hanging around, and it is not always possible or desirable to add
'exec'.
On another note, the EV_EXIT mode is erroneously still used if a trap on
EXIT has been set (or, maybe, any trap at all; particularly if -T is in
effect). This
On Fri, Apr 03, 2009 at 11:39:05PM +0200, Jilles Tjoelker wrote:
> I think this can be improved.
I have a patch now; it does not handle all cases but the effect on the
code is minimal. I decided to go with the readahead but only do it for
the first line.
To avoid problems with traps not be
d X mode bits are cleared from directories that show up in /dev/fd.
It does not come as a surprise to me that that hack does not work.
> I think that the actual solution for the walker problems is to
> ignore the synthetic filesystems altogether. The info
my misunderstanding?
The priority ceiling is only meaningful with the PTHREAD_PRIO_PROTECT
protocol (pthread_mutexattr_setprotocol()). The FreeBSD threads library
returns EINVAL if you try to get/set the priority ceiling with another
protocol.
--
Jilles Tjoelker
___
Although I haven't tried this, kqueue's SIGEV_SIGNAL may be helpful in
managing this from a single-threaded program. This is, however, not
portable.
--
Jilles Tjoelker
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/
o stdout.
If you are writing to a terminal, stdout is line-buffered. This means
that output is flushed when the buffer is full or a '\n' is written. A
'\r' is not good enough. You can force a write using fflush(stdout).
stderr i
ttern matching characters
literally).
> In order to strip the trailing star you should use
> -
> var=${var%[*]}
> -
> This gives you the pattern of '[*]' that is properly treated as the
> single star -- it's a weird way to escape the star in the patterns.
t the SA_SIGINFO flag if
they want queuing. This applies even if the signals are blocked and
received using sigwaitinfo(2) or sigtimedwait(2). 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
be
awakened).
This is documented in comments in the source code, 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 'kld
failed function calls or for
functions where it is documented 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-hacker
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 wrote:
> > > I propose adding a small new utility to /usr/bin: pwait. Similar to t
he unused entry... */
> - acl->ats_acl.acl_cnt--;
> - bzero(&acl->ats_acl.acl_entry[j],
> + 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 list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
"ports" system does that).
As described in the kqueue(2) man page, calling rfork(2) without RFFDG
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
onf and/or
shell startup files.
--
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"
ith EIO. This limit probably
has to do 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
1 - 100 of 126 matches
Mail list logo