Example #1
0
/**
 * execute command
 * return 0 on success or -1 on failed
 */
int execute_command(void) {
    /*pid_t pid = fork();
    if (pid == -1) {
        ERR_EXIT("fork");
    }
    if (pid == 0) {
        // execvp(cmd.args[0], cmd.args);
    }
    wait(NULL);*/
    execute_disk_command();
    return 0;
}
Example #2
0
/*
 * 执行命令
 * 成功返回0,失败返回-1
 */
int execute_command(void)
{
	execute_disk_command();
	return 0;
}