static int dispatch_systemExecute(dialogMenuItem *unused) { char *cmd = variable_get(VAR_COMMAND); if (cmd) return systemExecute(cmd) ? DITEM_FAILURE : DITEM_SUCCESS; else msgDebug("_systemExecute: No command passed in `command' variable.\n"); return DITEM_FAILURE; }
int dmenuSystemCommand(dialogMenuItem *self) { WINDOW *w = NULL; /* Keep lint happy */ /* If aux is set, the command is known not to produce any screen-spoiling output */ if (!self->aux) w = savescr(); systemExecute((char *)self->data); if (!self->aux) restorescr(w); return DITEM_SUCCESS; }
int main() { std::wstring commandLine; commandlineProcessor options; initProcessor(commandLine, options); if (options.s) { return systemExecute(commandLine); } else if (options.i) { return serviceExecute(commandLine); } else { return execute(commandLine, options); } }