Commit Graph

29 Commits

Author SHA1 Message Date
C. McEnroe
a2c5773b03 Log when service name pattern doesn't match 2020-08-15 17:50:19 -04:00
C. McEnroe
f67269202e Add FreeBSD rc script
I'm expecting to also have an OpenBSD rc script.
2020-08-15 17:40:17 -04:00
C. McEnroe
1e1a848f22 Call setproctitle with number of services 2020-08-15 16:53:15 -04:00
C. McEnroe
6fb08baee3 Rename project to catsit 2020-08-15 16:40:15 -04:00
C. McEnroe
449b0918ce Use only LOG_NOTICE and LOG_WARNING
These are the two priorities that go to a normal place
(/var/log/messages) by default.
2020-08-15 16:14:21 -04:00
C. McEnroe
3a57df720e Make log messages consistent 2020-08-15 15:57:45 -04:00
C. McEnroe
e25813c0b2 Remove closelog call
It's unclear whether closelog is really safe to call in pre-exec
context, so just trust that the log is opened with CLOEXEC.
2020-08-15 15:37:37 -04:00
C. McEnroe
92d27e09c3 Implement service status 2020-08-15 15:29:58 -04:00
C. McEnroe
b7e36c72a6 Parse control commands 2020-08-15 15:16:50 -04:00
C. McEnroe
34c39437f2 Read service pipes
Changed line reading functions to return const char * because modifying
the strings by adding '\0' into them screws up the following call.
2020-08-15 14:54:33 -04:00
C. McEnroe
f556af9ad5 Implement non-blocking line-buffered reading 2020-08-15 13:05:31 -04:00
C. McEnroe
3e2568aeb0 Generate tags file 2020-08-15 09:56:32 -04:00
C. McEnroe
f39d916e3a Just use CLOCK_MONOTONIC and clean up includes
CLOCK_MONOTONIC exists everywhere.
2020-08-15 09:53:03 -04:00
C. McEnroe
ba2175979c Reap children 2020-08-15 01:08:01 -04:00
C. McEnroe
e68a29c15e Implement serviceSignal, serviceStop, serviceRestart 2020-08-14 18:11:14 -04:00
C. McEnroe
0ca3c5c103 Reset restartInterval and restartDeadline on start 2020-08-14 17:55:01 -04:00
C. McEnroe
04ca84acda Switch to timespec for timeouts
Can be passed to ppoll(2) directly.
2020-08-14 17:44:27 -04:00
C. McEnroe
5f47019106 Implement serviceStart 2020-08-14 17:36:31 -04:00
C. McEnroe
ecc818534c Flesh out Service struct 2020-08-14 16:51:32 -04:00
C. McEnroe
96e962a08c Build environment for services 2020-08-14 16:17:29 -04:00
C. McEnroe
e0dab12078 Implement spawntab parsing 2020-08-14 16:00:35 -04:00
C. McEnroe
231dcefc55 Open syslog, daemonize, write PID 2020-08-14 16:00:35 -04:00
C. McEnroe
3b38cfdbfe Implement user and group lookup 2020-08-14 16:00:35 -04:00
C. McEnroe
b8ad6a4dbb Add install target 2020-08-14 16:00:35 -04:00
C. McEnroe
c9332d07f3 Add spawnd skeleton 2020-08-14 16:00:35 -04:00
C. McEnroe
32cf3d5617 Add prospective manual page for spawntab 2020-08-14 16:00:35 -04:00
C. McEnroe
2050d668af Add tentative implementation of spawn(8) 2020-08-14 16:00:34 -04:00
C. McEnroe
021003a3e0 Add prospective manual page for spawn 2020-08-14 16:00:34 -04:00
C. McEnroe
be9f064398 Add prospective manual page for spawnd 2020-08-14 16:00:34 -04:00