1
2
3
4
5 #ifndef MC__BACKGROUND_H
6 #define MC__BACKGROUND_H
7
8 #include <sys/types.h>
9 #include "filemanager/filegui.h"
10
11
12
13 enum TaskState
14 {
15 Task_Running,
16 Task_Stopped
17 };
18
19 typedef struct TaskList
20 {
21 int fd;
22 int to_child_fd;
23 pid_t pid;
24 int state;
25 char *info;
26 struct TaskList *next;
27 } TaskList;
28
29
30
31
32
33
34
35 extern TaskList *task_list;
36
37
38
39 int do_background (file_op_context_t * ctx, char *info);
40 int parent_call (void *routine, file_op_context_t * ctx, int argc, ...);
41 char *parent_call_string (void *routine, int argc, ...);
42
43 void unregister_task_running (pid_t pid, int fd);
44 void unregister_task_with_pid (pid_t pid);
45
46 gboolean background_parent_call (const gchar * event_group_name, const gchar * event_name,
47 gpointer init_data, gpointer data);
48
49 gboolean
50 background_parent_call_string (const gchar * event_group_name, const gchar * event_name,
51 gpointer init_data, gpointer data);
52
53
54
55 #endif