[systemd-devel] "StandardOutput=console" don't work as expected

Martin Pitt martin.pitt at ubuntu.com
Wed Dec 30 02:24:55 PST 2015


Reindl Harald [2015-12-30 11:10 +0100]:
> i just want systemd *not to touch* the stdout behavior when asked to do so -
> it don't need to know anything about ssh ptys, just don't touch stdout
> 
> i am asking for StandardOutput=console get piped to the terminal systemctl
> was called - the rest is done by crond as all the years before

This isn't how systemd works -- systemctl does *not* run any jobs by
itself, it just asks pid 1 [1] to run a job. Thus the stdout/err of
systemctl are completely irrelevant here.

To do what you want to do, don't put the code that you want to run
into a systemd unit, just run it straight away. Then you don't have
the indirection, and whatever you run will just output straight to
stdout/err.

Martin

[1] Or the user's systemd instance, but in this context it's really
the same thing
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151230/3d7215e6/attachment.sig>


More information about the systemd-devel mailing list