Re: How to redirect to /run/uncaught-logs/current?

From: Colin Booth <cathexis_at_gmail.com>
Date: Thu, 3 Nov 2016 00:21:25 -0700

On Wed, Nov 2, 2016 at 11:11 PM, Jean Louis <bugs_at_gnu.support> wrote:
> Thank you Colin.
>
>> Check to see where the stdout and stderr for the s6-supervise managing
>> acpid are pointing. They should be pointed at
>> /run/service/s6-svscan-log/fifo which has been inherited from
>> s6-svscan.
>
> Do I understand well, the stdout and stderr are inherited from script
> to script in s6-rc/services?
No. In the case of the longruns the inheritance goes stage1
script/init -> s6-svscan (by way of exec) -> s6-supervise (by way of
fork() )-> ./run (by way of fork() again). In the case of oneshots and
s6-rc it goes stage1 -> s6-svscan (via exec) -> s6rc-oneshot-runner
(via fork) -> individual oneshot (also via fork). Generally speaking,
you want the script that execs into s6-svscan to have cleaned up the
environment and redirected fd 0 to /dev/null and fd 1 and 2 to the
catch-all logger before exec'ing into s6-svscan since s6-svscan passes
off its environment and file descriptors to the individual
s6-supervise processes unadjusted.
>
> Basically, if I change something in a previous script, it is being
> inherited by acpid script?
No, like I said, the changes go parent to child. There's nothing in
serviceA that can affect serviceB from an environmental perspective.
>
>> if you're using s6-linux-init-maker, try regenerating your stage1
>> script with the -r option to s6-linux-init-maker, which force
>> redirects stdout and stderr from your stage2 script to the catch-all
>> logger.
>
> That makes me not see anything on screen, is it? I wish to see
> some basic messages on screen, to know what is being fired, at which
> moment, for later settings or tuning.
Once you get to the point that redirects stdout and stderr to the
catch-all logger, yes. However, you have full control over making
changes to your stage1 and stage2 scripts, in addition to any up,
down, run, and finish scripts, so when push comes to shove you can
tune things as necessary.

Cheers!

-- 
"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Thu Nov 03 2016 - 07:21:25 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC