license header for review
[cinelerra_cv/ct.git] / cinelerra / threadexec.h
blobe005bec5229d68a98b6c557a63d0579c40e09cc7
1 #ifndef THREADEXEC_H
2 #define THREADEXEC_H
5 // Construct command arguments, exec a background function with
6 // command line arguments, and wait for it.
10 // The reason we do this is that execvp and threading don't work together.
12 #include "bcwindowbase.inc"
13 #include "mutex.inc"
14 #include "thread.h"
15 #include <stdio.h>
18 class ThreadExec : public Thread
20 public:
21 ThreadExec();
22 virtual ~ThreadExec();
24 FILE* get_stdin();
25 void run();
26 void start_command(char *command_line, int pipe_stdin);
27 virtual void run_program(int argc, char *argv[], int stdin_fd);
30 private:
31 int filedes[2];
32 char **arguments;
33 char path[BCTEXTLEN];
34 int total_arguments;
35 FILE *stdin_fd;
36 Mutex *start_lock;
37 char *command_line;
38 int pipe_stdin;
44 #endif
46 // Local Variables:
47 // mode: C++
48 // c-file-style: "linux"
49 // End: