git: svc - Implement more features
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue Nov 11 16:37:57 PST 2014
commit 82f395276fa6ba7906ecc95917af85f30a54d7a1
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Nov 11 16:33:24 2014 -0800
svc - Implement more features
* All stdout/stderr output now goes to a pipe and a pipe buffering thread
to read it into a circular buffer as well as write it to the log file.
The program is now able to retain ~8KB worth of output in its circular
buffer whether there is a log file attached to the service or not.
* When /dev/null is specified as the log file, short-cut the descriptor to -1
instead of actually writing to /dev/null.
* log, logf, and tailf directives now work.
* Properly escape '.' on a line by itself for all buffered data dumped
over a remote link (allowing logs to contain our command response
terminator).
* Implement -f (foreground option) and clean-up descriptor initialization.
* Implement -s (sync on exit)
Summary of changes:
sbin/svc/execute.c | 370 +++++++++++++++++++++++++++++++++++++++++++++--------
sbin/svc/remote.c | 9 ++
sbin/svc/subs.c | 2 +-
sbin/svc/svc.c | 6 +
sbin/svc/svc.h | 13 +-
5 files changed, 341 insertions(+), 59 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/82f395276fa6ba7906ecc95917af85f30a54d7a1
--
DragonFly BSD source repository
More information about the Commits
mailing list