ke all xterms start login shells (e.g.
xterm -ls).
You may also be able to use setenv 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"
appropriate. This does not require
invasive changes to VirtualBox, and if you want a secure system you do
not install VirtualBox anyway.
This subversion could be done by overwriting the code of issetugid() or
by inserting a dummy implementation of issetugid() with FBSD_1.0 version
before libc
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 "
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/
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/
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
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.
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"
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
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
_
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()
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
).
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
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"
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
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
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
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
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
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 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.
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
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) {
> >
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
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.
--
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
(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
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
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
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
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
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
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 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
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
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
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
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 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()
+ 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 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
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
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
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"
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"
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
On Wed, Jan 25, 2012 at 11:54:46PM +0100, Jilles Tjoelker wrote:
> [snip]
> x micro-vfork-timings1-n
> + micro-vfork-t
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 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
> >
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"
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
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
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"
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"
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
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
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
;
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
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
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
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"
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
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
&
&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;
-
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
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"
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
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"
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
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/
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/
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/
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
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
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
/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
_
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"
(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
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
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
___
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
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
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/n
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
> r
or should 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"
using siginfo_t information to only waitpid() child
processes you know about, setting up the signal 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
eadfunc, NULL);
if (error != 0)
errc(1, error, "pthread_create");
sleep(1);
error = pthread_cancel(td);
if (error != 0)
errc(1, error, "pthread_cancel"
identifier in kern_acct.c, of course.
> This way I will be extremely easy to remember a process 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
irable to wait for
one together with other objects (pthread_mutex_timedlock() is meant as a
fail-safe).
Semaphores could also be waited for via kqueue, probably via a version
of sem_trywait() that registers the kqueue as a waiter. Once this is
signalled, the thread can call the function again to obtai
art working or work better 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"
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
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
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"
"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
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"
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
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
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
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
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.
1 - 100 of 126 matches
Mail list logo