2015-02-26 17:52:50 +01:00
|
|
|
diff --git a/start-stop-daemon/start-stop-daemon.8 b/start-stop-daemon/start-stop-daemon.8
|
2015-09-18 16:47:45 +02:00
|
|
|
index deae6c6..28d2de8 100644
|
2015-02-26 17:52:50 +01:00
|
|
|
--- a/start-stop-daemon/start-stop-daemon.8
|
|
|
|
+++ b/start-stop-daemon/start-stop-daemon.8
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
|
.\" You should have received a copy of the GNU General Public License
|
|
|
|
.\" along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
.
|
|
|
|
-.TH start\-stop\-daemon 8 "2014-03-26" "Debian Project" "dpkg utilities"
|
2015-09-24 13:51:41 +02:00
|
|
|
+.TH start\-stop\-daemon 8 "2015-09-21" "CRUX 3.2" "core services"
|
2015-02-26 17:52:50 +01:00
|
|
|
.SH NAME
|
|
|
|
start\-stop\-daemon \- start and stop system daemon programs
|
|
|
|
.
|
|
|
|
diff --git a/start-stop-daemon/start-stop-daemon.c b/start-stop-daemon/start-stop-daemon.c
|
2015-09-24 13:51:41 +02:00
|
|
|
index c844f2e..67cd043 100644
|
2015-02-26 17:52:50 +01:00
|
|
|
--- a/start-stop-daemon/start-stop-daemon.c
|
|
|
|
+++ b/start-stop-daemon/start-stop-daemon.c
|
2015-05-11 16:51:34 +02:00
|
|
|
@@ -20,10 +20,34 @@
|
2015-02-26 17:52:50 +01:00
|
|
|
* Changes by Ian Jackson: added --retry (and associated rearrangements).
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#if 0
|
|
|
|
#include <config.h>
|
|
|
|
#include <compat.h>
|
|
|
|
|
|
|
|
#include <dpkg/macros.h>
|
|
|
|
+#else
|
2015-09-24 13:51:41 +02:00
|
|
|
+# define VERSION "20150921"
|
2015-09-18 16:47:45 +02:00
|
|
|
+# define CRUX "CRUX 3.2"
|
2015-02-26 17:52:50 +01:00
|
|
|
+
|
|
|
|
+# define HAVE_SYS_PARAM_H
|
|
|
|
+# define HAVE_SYS_SYSCALL_H
|
|
|
|
+# define HAVE_SYS_SYSCTL_H
|
|
|
|
+# define HAVE_SYS_USER_H
|
|
|
|
+# define HAVE_STDDEF_H
|
|
|
|
+# define HAVE_ERROR_H
|
|
|
|
+# define HAVE_ERR_H
|
|
|
|
+
|
2015-05-11 16:51:34 +02:00
|
|
|
+# define HAVE_CLOCK_MONOTONIC
|
2015-02-26 17:52:50 +01:00
|
|
|
+# define HAVE_GETDTABLESIZE
|
|
|
|
+# define HAVE_IOPRIO_SET
|
|
|
|
+# define HAVE_SETSID
|
|
|
|
+
|
|
|
|
+# define DPKG_ATTR_NORET __attribute__((noreturn))
|
|
|
|
+# define DPKG_ATTR_PRINTF(X)
|
|
|
|
+
|
|
|
|
+# define _GNU_SOURCE
|
|
|
|
+# include <unistd.h>
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#if defined(linux)
|
|
|
|
# define OSLinux
|
2015-05-11 16:51:34 +02:00
|
|
|
@@ -142,6 +166,10 @@
|
2015-02-26 17:52:50 +01:00
|
|
|
#define HAVE_IOPRIO_SET
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#ifndef array_count
|
|
|
|
+# define array_count(x) (sizeof(x) / sizeof((x)[0]))
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#define IOPRIO_CLASS_SHIFT 13
|
|
|
|
#define IOPRIO_PRIO_VALUE(class, prio) (((class) << IOPRIO_CLASS_SHIFT) | (prio))
|
|
|
|
#define IO_SCHED_PRIO_MIN 0
|
2015-09-24 13:51:41 +02:00
|
|
|
@@ -310,8 +338,7 @@ xstrndup(const char *str, size_t n)
|
2015-05-11 16:51:34 +02:00
|
|
|
static void
|
|
|
|
timespec_gettime(struct timespec *ts)
|
|
|
|
{
|
|
|
|
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && \
|
|
|
|
- defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0
|
|
|
|
+#ifdef HAVE_CLOCK_MONOTONIC
|
|
|
|
if (clock_gettime(CLOCK_MONOTONIC, ts) < 0)
|
|
|
|
fatal("clock_gettime failed");
|
|
|
|
#else
|
2015-09-24 13:51:41 +02:00
|
|
|
@@ -615,9 +642,9 @@ usage(void)
|
2015-02-26 17:52:50 +01:00
|
|
|
static void
|
|
|
|
do_version(void)
|
|
|
|
{
|
|
|
|
- printf("start-stop-daemon %s for Debian\n\n", VERSION);
|
|
|
|
-
|
|
|
|
- printf("Written by Marek Michalkiewicz, public domain.\n");
|
|
|
|
+ printf("start-stop-daemon " VERSION " for " CRUX "\n\n"
|
|
|
|
+ "Written by Marek Michalkiewicz, public domain.\n"
|
|
|
|
+ "Adjusted for " CRUX ".\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void DPKG_ATTR_NORET
|