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