[systemd-devel] Fwd: Handling ExecStop failure
Reindl Harald
h.reindl at thelounge.net
Mon May 23 08:56:49 UTC 2016
Am 23.05.2016 um 10:50 schrieb Lennart Poettering:
> On Mon, 23.05.16 10:32, Reindl Harald (h.reindl at thelounge.net) wrote:
>> even something like "systemd-run -t --service-type=oneshot --quiet" behaves
>> differently and don't work if you call it via crond to get the typical
>> behavior of cronjobs sending mails when some output appears (imho a major
>> bug by design or accident)
>
> This is completely unrelated to Ashish' case.
>
> Note that what you do above should actually work fine on current
> systemd. With v230 I get:
>
> <snip>
> $ systemd-run -t --service-type=oneshot --quiet /bin/echo hallo | cat
> hallo
> </snip>
>
> Which suggests this works fine.
in a shell it works fine
but i talk about cronjobs like "8,38 * * * * root
/usr/local/bin/spamfilter-fetch-samples" where the shell-script invokes
systemd-run which finally calls a php-script producing output if there
where sammples on the imap-folders not already classified with BAYES_99
the intention is to use systemd-capabilities like "-p
ProtectSystem=full,ProtectHome=yes" starting with F24 and behave like a
classical cronjob -> producing emails to all administrators
> This didn't always works though, and it was pretty nasty to get right
> actually. The core of the problem is really that "-t" actually
> allocates a tty, and ttys know no clean concept of single-direction
> EOF, but only bi-directional hangups. Thus, using ttys as the backend
> for inner components of shell pipeliness, without losing trailing data
> is really hard to get right.
>
> But anyway, this should work now
at least not on current Fedora releases, maybe it works now
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160523/ba8c6621/attachment.sig>
More information about the systemd-devel
mailing list