Commands can contain $TERM to allow running apps in terminal.

Some heuristic gui/console determination, but pretty sucks for now.
This commit is contained in:
Sanel Zukan
2007-08-31 13:41:27 +00:00
parent aced43a39a
commit 8c57ce3e43
4 changed files with 94 additions and 9 deletions

View File

@@ -26,13 +26,14 @@
#define SPAWN_FORK_FAILED 1
#define SPAWN_EMPTY 2
#define SPAWN_EXECVE_FAILED 3
#define SPAWN_OPEN_FAILED 4
#define SPAWN_CHILD_CRASHED -2
#define SPAWN_CHILD_KILLED -3
typedef void (SignalWatch)(int pid, int status);
int spawn_program(const char* cmd, SignalWatch* wf = 0, pid_t* child_pid_ret = 0);
int spawn_program(const char* cmd, SignalWatch* wf = 0, pid_t* child_pid_ret = 0, const char* ofile = 0);
int spawn_program_with_core(const char* cmd, SignalWatch* wf = 0, pid_t* child_pid_ret = 0);
int spawn_backtrace(const char* program, const char* core, const char* output, const char* script);