1.1 --- a/libfsclient/lib/src/process.cc Wed Mar 29 00:32:20 2023 +0200
1.2 +++ b/libfsclient/lib/src/process.cc Mon Apr 03 00:35:34 2023 +0200
1.3 @@ -65,6 +65,12 @@
1.4 void process_init(process_t *process)
1.5 {
1.6 process->ref = L4_INVALID_CAP;
1.7 +
1.8 + /* Initialise the notifiable section of the structure. */
1.9 +
1.10 + process->notifiable.notifications = 0;
1.11 + process->notifiable.base = (notifiable_base_t *) process;
1.12 + process->notifiable.handler = NULL;
1.13 }
1.14
1.15 /* Start a process using the given arguments.
1.16 @@ -152,7 +158,6 @@
1.17
1.18 void process_notify_close(process_notifier_t *notifier)
1.19 {
1.20 - notifier->obj->stop();
1.21 delete notifier->obj;
1.22 delete notifier;
1.23 }
1.24 @@ -195,8 +200,7 @@
1.25
1.26 long process_notify_wait_process(process_t *process, process_notifier_t *notifier)
1.27 {
1.28 - SpecificObjectNotifier *specific_notifier = dynamic_cast<SpecificObjectNotifier *>(notifier->obj);
1.29 - long err = specific_notifier->wait_object(process_notifiable(process));
1.30 + long err = notifier->obj->wait_object(process_notifiable(process));
1.31
1.32 /* Unsubscribe if a termination notification has been received. */
1.33
1.34 @@ -214,9 +218,8 @@
1.35
1.36 long process_notify_wait_processes(process_t **process, process_notifier_t *notifier)
1.37 {
1.38 - GeneralObjectNotifier *general_notifier = dynamic_cast<GeneralObjectNotifier *>(notifier->obj);
1.39 notifiable_t *notifiable;
1.40 - long err = general_notifier->wait(¬ifiable);
1.41 + long err = notifier->obj->wait(¬ifiable);
1.42
1.43 *process = (process_t *) notifiable->base;
1.44