diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-23 01:24:04 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-24 01:54:15 +0200 |
commit | 39a18c60d07319ebfcfd476556729c2cadd616d6 (patch) | |
tree | b29036c82f9ae41e1366fea752f9e74ab0a1b29e /src/core/job.h | |
parent | 1b9cea0caa85dce6d9f117638a296b141c49a8fd (diff) |
job: serialize jobs properly
Jobs were not preserved correctly over a daemon-reload operation.
A systemctl process waiting for a job completion received a job removal
signal. The job itself changed its id. The job timeout started ticking all
over again.
This fixes the deficiencies.
Diffstat (limited to 'src/core/job.h')
-rw-r--r-- | src/core/job.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/job.h b/src/core/job.h index e869856d37..9da7e84a79 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -141,15 +141,21 @@ struct Job { bool in_dbus_queue:1; bool sent_dbus_new_signal:1; bool ignore_order:1; + bool forgot_bus_clients:1; }; JobBusClient* job_bus_client_new(DBusConnection *connection, const char *name); Job* job_new(Unit *unit, JobType type); +Job* job_new_raw(Unit *unit); void job_free(Job *job); Job* job_install(Job *j); +void job_install_deserialized(Job *j); void job_uninstall(Job *j); void job_dump(Job *j, FILE*f, const char *prefix); +int job_serialize(Job *j, FILE *f, FDSet *fds); +int job_deserialize(Job *j, FILE *f, FDSet *fds); +int job_coldplug(Job *j); JobDependency* job_dependency_new(Job *subject, Job *object, bool matters, bool conflicts); void job_dependency_free(JobDependency *l); |