+ char buf[1024];
+ int pos = 0;
+ int status;
+
+ close(pipe_fd[1]);
+
+ while(1)
+ {
+ int len;
+
+ len = read(pipe_fd[0], buf+pos, sizeof(buf)-pos-1);
+ if(len<=0)
+ break;
+ pos += len;
+ }
+
+ buf[pos] = 0;
+
+ waitpid(pid, &status, 0);
+ if(!WIFEXITED(status) || WEXITSTATUS(status))
+ {
+ GtkWidget *dialog;
+
+ 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);
+ }
+ else
+ gtk_main_quit();
+ }
+ else
+ {