ndk-busybox/runit
Francis Rounds d2c5de0130 svlogd: strip leading '!' from processor lines
When using svlogd's processor functionality to run arbitrary commands
on log rotation, the line in the config is executed verbatim, i.e. the
exclamation mark is included.

For example, if the config file contains:

    s100
    !cat

then when it's time to rotate the log files after each 100 bytes, sh -c
"!cat" will be run, instead of sh -c "cat" as intended. The result is
svlogd logging

    /bin/bash: !cat: command not found
    svlogd: warning: processor failed, restart: /tmp/svlogd/

over and over again as it keeps attempting to execute the processor and
failing (unless you happen to have a "!cat" binary around :)).

Skipping the exclamation mark when performing the wstrdup() fixes the
issue.

Signed-off-by: Francis Rounds <francis.rounds@4bridgeworks.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-09-15 14:05:04 +02:00
..
chpst.c getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LIST 2016-07-06 21:58:02 +02:00
Config.src runit/*: convert to new-style "one file" applets 2015-10-19 00:41:28 +02:00
Kbuild.src runit/*: convert to new-style "one file" applets 2015-10-19 00:41:28 +02:00
runit_lib.h remove runit/runit_lib.c 2010-10-13 12:53:27 +02:00
runsv.c *: add most of the required setup_common_bufsiz() calls 2016-04-21 18:18:48 +02:00
runsvdir.c *: placate some compile warnings on OSX 2016-09-01 11:16:22 +02:00
sv.c getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LIST 2016-07-06 21:58:02 +02:00
svlogd.c svlogd: strip leading '!' from processor lines 2016-09-15 14:05:04 +02:00