+ if(pid)
+ waitpid(pid, &status, 0);
+
+ buf[pos] = 0;
+
+ if(verbosity>=1)
+ {
+ if(WIFEXITED(status))
+ {
+ if(WEXITSTATUS(status))
+ printf("Command exited successfully\n");
+ else
+ printf("Command exited with status %d\n", WEXITSTATUS(status));
+ }
+ else if(WIFSIGNALED(status))
+ printf("Command terminated with signal %d\n", WTERMSIG(status));
+ else
+ printf("Command exited with unknown result %04X\n", status);
+ }
+
+ if(!WIFEXITED(status) || WEXITSTATUS(status))
+ {
+ GtkWidget *dialog;
+
+ /* Pmount terminated with nonzero status or a signal. Display an
+ error to the user. */
+ dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", buf);
+ g_signal_connect(dialog, "response", >k_main_quit, NULL);
+ gtk_widget_show_all(dialog);
+ return;
+ }
+
+ gtk_main_quit();
+