mc/src/background.h
Alexander Moiseenko 936727622d Fixed problems:
* When try to replace existing file in background operation
  assertion raised (created operations for initialization ctx->ui for background):
  ** (mc:25716): CRITICAL **: file_progress_real_query_replace: assertion `ctx->ui != NULL' failed

 * Process has been already done, but still draw in list (C-x j)

 * Process is stopped or worked, remove operation don't hide process from list, but kill it

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-28 12:05:07 +02:00

41 lines
817 B
C

/** \file background.h
* \brief Header: Background support
*/
#ifndef MC_BACKGROUND_H
#define MC_BACKGROUND_H
#ifdef WITH_BACKGROUND
#include <sys/types.h> /* pid_t */
enum TaskState {
Task_Running,
Task_Stopped
};
typedef struct TaskList {
int fd;
int to_child_fd;
pid_t pid;
int state;
char *info;
struct TaskList *next;
} TaskList;
extern struct TaskList *task_list;
struct FileOpContext;
int do_background (struct FileOpContext *ctx, char *info);
int parent_call (void *routine, struct FileOpContext *ctx, int argc, ...);
char *parent_call_string (void *routine, int argc, ...);
void unregister_task_running (pid_t pid, int fd);
void unregister_task_with_pid (pid_t pid);
extern int we_are_background;
#endif /* !WITH_BACKGROUND */
#endif /* MC_BACKGROUND_H */