Re: unit been dead before been running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 13.03.19 11:40, aleivag (aleivag@xxxxxxxxx) wrote:

> Hi all:
>
> Sorry to bring this up again... here is what i plan to do, i'm just asking
> if this make sense.
>
> (the context is that i start a transient unit, and pass tty fd, and i need
> to know when the unit is dead, so i can close my fds)
> `systemd1.Manager.StartTransientUnit` returns a job in the form of
> `/org/freedesktop/systemd1/job/<job_id>`, so i'm just going to ignore all
> messages that comes with that Job. Because those comes when the unit is
> starting up.. the final `dead` of `failed` message comes with Job
> (0, '/')..

> do that make sense?

Yes, somewhat. I mean, that's basically like waiting for JobRemoved,
as the instant where the Job property goes to (0, '/') is also the
instant where JobRemoved is sent out. Normally, one would wait for
JobRemoved though, not just PropertiesChanged, as the JobRemoved
message contains info if the job actually succeeeded or not.

Lennart

--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux