r1026: Videoscope layout tweaks.
[cinelerra_cv/ct.git] / cinelerra / threadexec.h
blobcf915f1e09ea4eaa925b7a5c881d165c3042f042
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