# HG changeset patch # User Paul Boddie # Date 1679523196 -3600 # Node ID 32d715531598f0e3bb12815a7ee8371bb0cb87df # Parent c3799acf75b4db3bb8923ca9803a0123e78d7a4d Obtain the task-level notifier at the start, closing it at the end of the test. diff -r c3799acf75b4 -r 32d715531598 tests/dstest_exec.cc --- a/tests/dstest_exec.cc Wed Mar 22 18:05:48 2023 +0100 +++ b/tests/dstest_exec.cc Wed Mar 22 23:13:16 2023 +0100 @@ -38,6 +38,10 @@ return 1; } + /* Obtain the common notifier. */ + + process_notifier_t *notifier = process_notify_task(); + /* Create a new process structure. */ process_t process; @@ -58,10 +62,6 @@ printf("Finished program initiation.\n"); - /* Obtain the common notifier. */ - - process_notifier_t *notifier = process_notify_task(); - /* Subscribe to the process for notifications. */ err = process_notify_subscribe(&process, NOTIFY_TASK_SIGNAL, notifier); @@ -89,6 +89,8 @@ printf("End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", flags, values.sig, values.val); + process_notify_close(notifier); + printf("End of test.\n"); return 0; }