aboutsummaryrefslogtreecommitdiff
path: root/src/librc/librc-daemon.c
AgeCommit message (Collapse)Author
2015-01-12fix double free of pidfileDoug Freed
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
2014-11-01Fix incorrect handling of chroot option.Alexander Vershilov
Fixes #28. X-Gentoo-Bug: #527370 X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=527370
2014-10-23Bundle <sys/queue.h> from NetBSDAnthony G. Basile
We are bundling this to allow building on musl-based systems since musl does not include <sys/queue.h>.
2014-10-23Fix all tests for GNU/kFreeBSDWilliam Hubbs
It is necessary to check for both the kernel and c library because __FreeBSD_kernel is also defined on native FreeBSD [1]. [1] http://sourceforge.net/p/predef/wiki/OperatingSystems/
2014-10-22Fix GNU/kFreeBSD portSvante Signell
Check for __FreeBSD_kernel instead of __GLIBC__ in source files. note from William Hubbs: I was told this is a better check for GNU/kFreeBSD than checking the C library the source is being compiled against. GNU/kFreeBSD than checking which library we are using.
2014-10-20librc:look for the pid file in a chroot if definedAlexander Vershilov
X-Gentoo-Bug: 524388 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524388
2014-07-19src/librc/librc-daemon.c: style fixWilliam Hubbs
2014-06-20librc: filter out container processes on OpenVZ hostWilliam Hubbs
Thanks to info and testing done by Daniel Robbins <drobbins@funtoo.org>, there is now a fix for this. Below is his description of the steps OpenRC needed to use. 1) See if /proc/<pid>/status exists 2) If it does, see if it has a "envID:" field 3) If it does, see if "envID:" is set to "0" 4) If so, then it's one of the host's processes and should be a candidate for the list. Otherwise, it is one of the container's processes and should be ignored. This should fix the bug and allow start-stop-daemon to work properly on OpenVZ hosts. X-Gentoo-Bug: 376817 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=376817
2013-10-30Begin port to GNU/kFreeBSDSteven Chamberlain
This is just a minimal port to get Debian up and running; the rest will be done later.
2013-07-25Add support for DragonFly BSDGary
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28librc: tweak style: foo () -> foo()Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17Style fix: "char *foo" not "char* foo".Robin H. Johnson
2011-01-17Clean up all trailing whitespace in src/.Robin H. Johnson
2009-05-01Add (c) to CopyrightRoy Marples
2009-04-25Use kill for the pid check as it's fast.Roy Marples
2009-04-23Improve style for KNFRoy Marples
2009-01-12CopyrightRoy Marples
2009-01-12Use snprintf instead of strlcpy to save on size if not available.Roy Marples
2008-09-22We don't check exec when starting, so don't when testing for crashed.Roy Marples
2008-09-19Fix stopping wpa_supplicant incorrectly, #107Roy Marples
2008-07-27Attempt to make s-s-d simpler by not enforcing the need for a full path and ↵Roy Marples
maybe working better with interpreted scripts.
2008-04-30Wups, test compiles before commiting :)Roy Marples
2008-04-30Remove redundant checking of /proc/pid/exeRoy Marples
2008-04-30Save a few bytes and make it easier to read.Roy Marples
2008-04-30No need to init this.Roy Marples
2008-04-30Make the function a little smaller.Roy Marples
2008-04-30StyleRoy Marples
2008-04-21If we don't have permission to inspect the pidfile, don't report crashed. ↵Roy Marples
Gentoo #218028.
2008-03-26Add license blurb to a few files and append my email to my name.Roy Marples
2008-03-21We should only free the buffer when done reading the dir.Roy Marples
2008-03-17Make rc_getline private and save it's buffer so it's sort of like getline ↵Roy Marples
from glibc.
2008-03-17init some vars.Roy Marples
2008-03-17We should check for NULL here.Roy Marples
2008-03-17Punt the rc_strcatpaths function and use snprintf instead to save on ↵Roy Marples
expensive malloc calls.
2008-03-17rc_find_pids now returns RC_PIDLIST instead of a NULL terminated array.Roy Marples
2008-03-16Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ ↵Roy Marples
from queue(3). Refactor code style around the BSD KNF.
2008-03-03Sanitise the BSD defines a little.Roy Marples
2008-03-03Ensure that normal users can use s-s-d on NetBSD.Roy Marples
2008-02-23Now that s-s-d accepts >1 argument for stopping a daemon on match we need to ↵Roy Marples
store all arguments used incase a service started the same daemon more than once with different paramters.
2008-02-22Welcome to 2008.Roy Marples
2008-02-18Fix compile on FreeBSD.Roy Marples
2008-02-18We need to check for contents of argv too.Roy Marples
2008-02-18Fix a signed error.Roy Marples
2008-02-17We need to be able to locate pids by argv, instead of just argv0.Roy Marples
2008-02-13Use _PATH_DEVNULL on FreeBSD when using kvm_openfiles so we work in a jail, ↵Roy Marples
bug #21.
2008-01-30Add xzalloc function to reduce size.Roy Marples
2008-01-28Fix service_started_daemon, bug #11Roy Marples
2008-01-22Quiet some lint warnings.Roy Marples
2008-01-14strip trailing newlinesMike Frysinger