Moved dir $(srcdir)/syntax into $(srcdir)/misc/syntax
[midnight-commander.git] / src / background.h
blob2dc4bf4af0b60c6a8609703df4cbb40e547752c8
2 /** \file background.h
3 * \brief Header: Background support
4 */
6 #ifndef MC_BACKGROUND_H
7 #define MC_BACKGROUND_H
9 #ifdef WITH_BACKGROUND
11 #include <sys/types.h> /* pid_t */
13 enum TaskState {
14 Task_Running,
15 Task_Stopped
18 typedef struct TaskList {
19 int fd;
20 int to_child_fd;
21 pid_t pid;
22 int state;
23 char *info;
24 struct TaskList *next;
25 } TaskList;
27 extern struct TaskList *task_list;
29 struct FileOpContext;
30 int do_background (struct FileOpContext *ctx, char *info);
31 int parent_call (void *routine, struct FileOpContext *ctx, int argc, ...);
32 char *parent_call_string (void *routine, int argc, ...);
34 void unregister_task_running (pid_t pid, int fd);
35 void unregister_task_with_pid (pid_t pid);
36 extern int we_are_background;
38 #endif /* !WITH_BACKGROUND */
40 #endif /* MC_BACKGROUND_H */