Compare commits

...

9 Commits

Author SHA1 Message Date
William Hubbs
449080e145 release openrc-0.6.7 2010-12-03 14:51:30 -06:00
Thomas Pfaff
062223a5df Avoid race condition in runscript (bug #319865)
Under normal conditions, runscript creates one child and waits for its
termination, which is signaled by a pipe write from the SIGCHLD
sighandler.

When running killprocs however more than one SIGHCLD signal is generated, at
least on all of my amd64 boxes running on real hardware and in vmware.

When the first SIGCHLD occurs svc_exec leaves the loop and closes the pipe.
Subsequent SIGCHLDs during the close can lead to a race condition and create an
EBADF error in the pipe write (pipe is closed but the file handle is still !=
-1).

We avoid this by blocking SIGHCHLD during the pipe close.
2010-12-03 14:01:28 -06:00
William Hubbs
18064e19f6 release openrc-0.6.6 2010-11-30 16:04:17 -06:00
William Hubbs
cdf07b5970 localmount should only use the -O option for linux systems
This fixes bug #347307.
2010-11-30 15:40:44 -06:00
William Hubbs
82b265016a send error output from chattr command to /dev/null
This is for bug #346659.
2010-11-26 14:54:30 -06:00
William Hubbs
bdfab242b7 release openrc-0.6.5 2010-11-21 11:08:53 -06:00
William Hubbs
4ca32808dd Revert "allow ifplugd to work on wireless interfaces"
This reverts commit 4ea75dd1d6.
This caused a regression, see bug #345795.

Ifplugd is only designed to support wireless interfaces that use the
older wireless extentions.
2010-11-18 15:06:42 -06:00
William Hubbs
9e5b9abf40 remove "use hostname" from sysctl for bsd systems 2010-11-16 10:03:05 -06:00
William Hubbs
ac37dc2764 do not mount local file systems with the _netdev option in fstab
This fixes #344947.
2010-11-15 12:01:48 -06:00
6 changed files with 18 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.6.4
VERSION= 0.6.7
PKG= ${NAME}-${VERSION}

View File

@@ -39,7 +39,7 @@ cleanup_tmp_dir()
# each user gets a private directory with immutable
# bit set; remove the immutable bit before trying to
# remove it.
[ -d /tmp/.private ] && chattr -R -a /tmp/.private
[ -d /tmp/.private ] && chattr -R -a /tmp/.private 2> /dev/null
find $startopts ! -name . \
! -path "./lost+found" \

View File

@@ -14,13 +14,16 @@ depend()
start()
{
# Mount local filesystems in /etc/fstab.
local types="noproc" x=
local types="noproc" x= no_netdev=
for x in $net_fs_list; do
types="${types},${x}"
done
if [ "$RC_UNAME" = Linux ]; then
no_netdev="-O no_netdev"
fi
ebegin "Mounting local filesystems"
mount -at "$types"
mount -at "$types" $no_netdev
eend $? "Some local filesystem failed to mount"
# Always return 0 - some local mounts may not be critical for boot

View File

@@ -4,7 +4,6 @@
depend()
{
use hostname
before bootmisc logger
keyword -prefix
}

View File

@@ -27,8 +27,8 @@ ifplugd_pre_start()
return 0
fi
# We don't work on bonded, bridges, tun/tap or vlan
for f in bond bridge tuntap vlan; do
# We don't work on bonded, bridges, tun/tap, vlan or wireless
for f in bond bridge tuntap vlan wireless; do
if type "_is_${f}" >/dev/null 2>&1; then
if _is_${f}; then
veinfo "ifplugd does not work with ${f}"

View File

@@ -350,6 +350,8 @@ svc_exec(const char *arg1, const char *arg2)
size_t bytes;
bool prefixed = false;
int slave_tty;
sigset_t sigchldmask;
sigset_t oldmask;
/* Setup our signal pipe */
if (pipe(signal_pipe) == -1)
@@ -439,10 +441,17 @@ svc_exec(const char *arg1, const char *arg2)
}
free(buffer);
sigemptyset (&sigchldmask);
sigaddset (&sigchldmask, SIGCHLD);
sigprocmask (SIG_BLOCK, &sigchldmask, &oldmask);
close(signal_pipe[0]);
close(signal_pipe[1]);
signal_pipe[0] = signal_pipe[1] = -1;
sigprocmask (SIG_SETMASK, &oldmask, NULL);
if (master_tty >= 0) {
/* Why did we do this? */
/* signal (SIGWINCH, SIG_IGN); */