# HG changeset patch # User Paul Boddie # Date 1679498069 -3600 # Node ID 9e172f6a72717da590af8e3fdaeca956e8cac3fc # Parent 48a46e7a32e78739bdf2e84ab8fecc17275f8151 Obtain the task-level notifier only one, closing it at the end of the test. diff -r 48a46e7a32e7 -r 9e172f6a7271 tests/dstest_exec_many.cc --- a/tests/dstest_exec_many.cc Wed Mar 22 00:26:17 2023 +0100 +++ b/tests/dstest_exec_many.cc Wed Mar 22 16:14:29 2023 +0100 @@ -41,6 +41,10 @@ int num_processes = atoi(argv[1]); + /* Obtain the common notifier. */ + + process_notifier_t *notifier = process_notify_task(); + /* Create a new process structure. */ process_t process; @@ -63,10 +67,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); @@ -95,6 +95,8 @@ printf("[%d/%d] End process (flags %" pFMTnotify_flags "x values: %ld, %ld)\n", i, num_processes, flags, values.sig, values.val); } + process_notify_close(notifier); + printf("End of test.\n"); return 0; }