2009-02-05 21:28:18 +03:00
|
|
|
|
|
|
|
/** \file background.h
|
|
|
|
* \brief Header: Background support
|
|
|
|
*/
|
|
|
|
|
2004-12-03 22:17:46 +03:00
|
|
|
#ifndef MC_BACKGROUND_H
|
|
|
|
#define MC_BACKGROUND_H
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2003-10-26 03:58:14 +03:00
|
|
|
#ifdef WITH_BACKGROUND
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
enum TaskState {
|
|
|
|
Task_Running,
|
|
|
|
Task_Stopped
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct TaskList {
|
2003-10-26 03:58:14 +03:00
|
|
|
int fd;
|
1998-02-27 07:54:42 +03:00
|
|
|
pid_t pid;
|
2003-10-26 03:58:14 +03:00
|
|
|
int state;
|
|
|
|
char *info;
|
1998-02-27 07:54:42 +03:00
|
|
|
struct TaskList *next;
|
|
|
|
} TaskList;
|
|
|
|
|
|
|
|
extern struct TaskList *task_list;
|
|
|
|
|
2003-10-24 22:28:32 +04:00
|
|
|
struct FileOpContext;
|
|
|
|
int do_background (struct FileOpContext *ctx, char *info);
|
|
|
|
int parent_call (void *routine, struct FileOpContext *ctx, int argc, ...);
|
2003-10-26 01:54:55 +04:00
|
|
|
char *parent_call_string (void *routine, int argc, ...);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2003-10-26 08:42:29 +03:00
|
|
|
void unregister_task_running (pid_t pid, int fd);
|
2003-10-26 03:58:14 +03:00
|
|
|
extern int we_are_background;
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2003-10-26 03:58:14 +03:00
|
|
|
#endif /* !WITH_BACKGROUND */
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2004-12-03 22:17:46 +03:00
|
|
|
#endif /* MC_BACKGROUND_H */
|