+ fprintf(stderr, "notify_post(com.apple.mobile.springboard_teardown)\n");
+ notify_post("com.apple.mobile.springboard_teardown");
+
+ if (pid != -1) {
+ fprintf(stderr, "waiting for kill(%u) != 0...\n", pid);
+ while (kill(pid, 0) == 0)
+ stop();
+
+ int error = errno;
+ _assert(error == ESRCH, "kill(%u): %s", pid, strerror(error));
+ }
+
+ request = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
+ launch_data_dict_insert(request, job, LAUNCH_KEY_SUBMITJOB);
+
+ for (;;) {
+ response = launch_msg(request);
+ _assert(response != NULL, "launch_msg(SubmitJob) == NULL");
+
+ _assert(launch_data_get_type(response) == LAUNCH_DATA_ERRNO, "launch_data_get_type() != ERRNO");
+ int error = launch_data_get_errno(response);
+ launch_data_free(response);
+
+ const char *string = strerror(error);