edelib: edelib/Run.h Source File

edelib 0.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List

Run.h
1 /*
2 * $Id: Run.h 2839 2009-09-28 11:36:20Z karijes $
3 *
4 * Run external program
5 * Copyright (c) 2005-2007 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef __EDELIB_RUN_H__
22 #define __EDELIB_RUN_H__
23
24 #include "edelib-global.h"
25
26 EDELIB_NS_BEGIN
27
28 enum {
29 RUN_NOT_FOUND = 65535,
30 RUN_EMPTY = 65534,
31 RUN_NOT_EXEC = 65533,
32 RUN_FORK_FAILED = 65532,
33 RUN_WAITPID_FAILED = 65531,
34 RUN_EXECVE_FAILED = 65530,
35 RUN_PIPE_FAILED = 65529,
36 RUN_NO_ACCESS = 65528
37 };
38
55 EDELIB_API int run_program(const char* cmd, bool wait = true) EDELIB_DEPRECATED;
56
61 EDELIB_API int run_program_fmt(bool wait, const char* fmt, ...) EDELIB_DEPRECATED;
62
77 EDELIB_API int run_sync(const char* fmt, ...);
78
82 EDELIB_API int run_async(const char* fmt, ...);
83
84 EDELIB_NS_END
85 #endif