+static int exec_command(char* const*argv)
+{
+ pid_t pid = vfork();
+ if( pid < 0 ) return -1;
+ if( pid > 0 ) {
+ int stat = 0;
+ waitpid(pid, &stat, 0);
+ if( stat ) {
+ char msg[BCTEXTLEN];
+ sprintf(msg, "%s: error exit status %d", argv[0], stat);
+ MainError::show_error(msg);
+ }
+ return 0;
+ }
+ execvp(argv[0], &argv[0]);
+ return -1;
+}
+