Compare commits

...

8 Commits

Author SHA1 Message Date
William Hubbs
e0c746e938 Create ChangeLog 2015-01-15 09:51:12 -06:00
William Hubbs
50329eee7a Add description for cgroup_cleanup
X-Gentoo-Bug: 535184
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=535184
2015-01-13 01:07:02 -06:00
Doug Freed
fb81028121 fix double free of pidfile
This fixes a double free of the pidfile variable. For discussion of this
issue, see the bug.

X-Gentoo-Bug: 531600
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=531600
2015-01-13 01:07:02 -06:00
William Hubbs
50e99aa30a Do not call the shell to evaluate CHANGELOG_LIMIT
The git log command understands dates such as "1 year ago", so there is
no need to use the date command.
2015-01-13 01:07:02 -06:00
William Hubbs
b177b79242 Add target to create ChangeLog
This was added by request because some users are requesting a ChangeLog.

This fixes #29.
2015-01-13 01:07:02 -06:00
William Hubbs
7009f66872 start working on 0.13.7 2015-01-13 00:45:19 -06:00
William Hubbs
2eb0ea9afb Make sysfs behave like netmount and localmount
sysfs now mounts all related sysfs file systems and returns success,
like netmount and localmount.

Also, we now check to make sure the cgroups are not mounted before we
mount them.

X-Gentoo-Bug: 530138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=530138
2014-11-23 21:59:01 -06:00
William Hubbs
534031fc7a Start work on 0.13.6 2014-11-23 21:57:44 -06:00
6 changed files with 1028 additions and 25 deletions

1010
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.13.5
VERSION= 0.13.7
PKG= ${NAME}-${VERSION}

View File

@@ -113,7 +113,8 @@ mount_cgroups()
yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0
while read name hier groups enabled rest; do
case "${enabled}" in
1) mkdir /sys/fs/cgroup/${name}
1) mountinfo -q /sys/fs/cgroup/${name} && continue
mkdir /sys/fs/cgroup/${name}
mount -n -t cgroup -o ${sysfs_opts},${name} \
${name} /sys/fs/cgroup/${name}
;;
@@ -129,25 +130,13 @@ restorecon_sys()
restorecon -rF /sys/fs/cgroup >/dev/null 2>&1
eend $?
fi
return 0
}
start()
{
local retval
mount_sys
retval=$?
if [ $retval -eq 0 ]; then
mount_misc
retval=$?
fi
if [ $retval -eq 0 ]; then
mount_cgroups
retval=$?
fi
mount_misc
mount_cgroups
restorecon_sys
return $retval
return 0
}

View File

@@ -8,12 +8,17 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2
CLEANFILES+= ${NAME}-*.tar.bz2
CHANGELOG_LIMIT?= --after="1 year ago"
_SNAP_SH= date -u +%Y%m%d%H%M
_SNAP:= $(shell ${_SNAP_SH})
SNAP= ${_SNAP}
SNAPDIR= ${DISTPREFIX}-${SNAP}
SNAPFILE= ${SNAPDIR}.tar.bz2
changelog:
git log ${CHANGELOG_LIMIT} --format=medium > ChangeLog
dist:
git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE}

View File

@@ -2,6 +2,7 @@
# Copyright (c) 2012 Alexander Vershilov <qnikst@gentoo.org>
# Released under the 2-clause BSD license.
extra_stopped_commands="${extra_stopped_commands} cgroup_cleanup"
description_cgroup_cleanup="Kill all processes in the cgroup"
cgroup_find_path()
{

View File

@@ -560,22 +560,20 @@ rc_service_daemons_crashed(const char *service)
spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
strcpy(spidfile, ch_root);
strcat(spidfile, pidfile);
free(pidfile);
pidfile = spidfile;
}
pid = 0;
if (spidfile) {
if (pidfile) {
retval = true;
if ((fp = fopen(spidfile, "r"))) {
if ((fp = fopen(pidfile, "r"))) {
if (fscanf(fp, "%d", &pid) == 1)
retval = false;
fclose(fp);
}
free(spidfile);
spidfile = NULL;
if (ch_root) {
free(pidfile);
pidfile = NULL;
}
free(pidfile);
pidfile = NULL;
/* We have the pid, so no need to match
on exec or name */