void mpClose() { if (mpState) { mpCommand("quit"); ShellWait(&mpx,1); ShellClean(&mpx); } }
void mpClose() { mpPos = -1; if (mpState != MP_IDLE) { if (mpCommand("quit") > 0) ShellWait(&mpx,1000); ShellTerminate(&mpx); ShellClean(&mpx); } }
int ShellRun(SHELL_PARAM* param, const char* cmdline) { int ret; SHELL_PARAM* proc = param; if (!param) proc = calloc(1, sizeof(SHELL_PARAM)); ret = ShellExec(proc, cmdline); if (ret == 0) { if (proc->flags & SF_READ_STDOUT_ALL) ShellRead(proc, -1); else ShellWait(proc, -1); } ShellClean(proc); if (!param) { free(proc); } return ret; }