r668: Configure.in and autogen.sh cleanup based on ideas by giskard.
[cinelerra_cv.git] / cinelerra / threadfork.h
bloba383a1c6aca31f4c54f1b89de35847260130f80d
1 #ifndef THREADFORK_H
2 #define THREADFORK_H
5 // Construct command arguments, fork a background process and wait for it.
7 #include "bcwindowbase.inc"
8 #include <pthread.h>
9 #include <stdio.h>
11 class ThreadFork
13 public:
14 ThreadFork();
15 ~ThreadFork();
17 FILE* get_stdin();
18 void run();
19 void start_command(char *command_line, int pipe_stdin);
21 static void* entrypoint(void *ptr);
23 private:
24 int filedes[2];
25 int pid;
26 pthread_t tid;
27 char **arguments;
28 char path[BCTEXTLEN];
29 int total_arguments;
30 FILE *stdin_fd;
31 pthread_mutex_t start_lock;
32 char *command_line;
33 int pipe_stdin;
39 #endif