edelib
2.0.0
|
00001 /* 00002 * $Id: Run.h 2839 2009-09-28 11:36:20Z karijes $ 00003 * 00004 * Run external program 00005 * Copyright (c) 2005-2007 edelib authors 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef __EDELIB_RUN_H__ 00022 #define __EDELIB_RUN_H__ 00023 00024 #include "edelib-global.h" 00025 00026 EDELIB_NS_BEGIN 00027 00028 enum { 00029 RUN_NOT_FOUND = 65535, 00030 RUN_EMPTY = 65534, 00031 RUN_NOT_EXEC = 65533, 00032 RUN_FORK_FAILED = 65532, 00033 RUN_WAITPID_FAILED = 65531, 00034 RUN_EXECVE_FAILED = 65530, 00035 RUN_PIPE_FAILED = 65529, 00036 RUN_NO_ACCESS = 65528 00037 }; 00038 00055 EDELIB_API int run_program(const char* cmd, bool wait = true) EDELIB_DEPRECATED; 00056 00061 EDELIB_API int run_program_fmt(bool wait, const char* fmt, ...) EDELIB_DEPRECATED; 00062 00077 EDELIB_API int run_sync(const char* fmt, ...); 00078 00082 EDELIB_API int run_async(const char* fmt, ...); 00083 00084 EDELIB_NS_END 00085 #endif