summaryrefslogtreecommitdiff
path: root/examples/ROOT/img/tmpfs/service/s6-svscan-log/run
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ROOT/img/tmpfs/service/s6-svscan-log/run')
-rwxr-xr-xexamples/ROOT/img/tmpfs/service/s6-svscan-log/run13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/ROOT/img/tmpfs/service/s6-svscan-log/run b/examples/ROOT/img/tmpfs/service/s6-svscan-log/run
new file mode 100755
index 0000000..a55a822
--- /dev/null
+++ b/examples/ROOT/img/tmpfs/service/s6-svscan-log/run
@@ -0,0 +1,13 @@
+#!/command/execlineb -P
+redirfd -w 2 /dev/console
+redirfd -rnb 0 fifo
+s6-setuidgid nobody
+exec -c
+s6-log -bpt /tmp/uncaught-logs
+
+# The -p option is important:
+# even if s6-svscan is told to kill everything,
+# you do not want this logger to die.
+# The -b option ensures s6-log processes lines one
+# at a time, so it doesn't eat up too much memory
+# in case of a problem spike.