2 * \brief Header: concurrent shell support
8 /*** typedefs(not structures) and defined constants **********************************************/
10 /* Used to distinguish between a normal MC termination and */
11 /* one caused by typing `exit' or `logout' in the subshell */
12 #define SUBSHELL_EXIT 128
14 #ifdef HAVE_SUBSHELL_SUPPORT
16 /*** enums ***************************************************************************************/
18 /* State of the subshell; see subshell.c for an explanation */
20 enum subshell_state_enum
27 /* For the `how' argument to various functions */
34 /*** structures declarations (and typedefs of structures)*****************************************/
36 /*** global variables defined in .c file *********************************************************/
38 extern enum subshell_state_enum subshell_state
;
40 /* Holds the latest prompt captured from the subshell */
41 extern char *subshell_prompt
;
43 extern gboolean update_subshell_prompt
;
45 /*** declarations of public functions ************************************************************/
47 void init_subshell (void);
48 int invoke_subshell (const char *command
, int how
, vfs_path_t
** new_dir
);
49 int read_subshell_prompt (void);
50 void do_update_prompt (void);
51 int exit_subshell (void);
52 void do_subshell_chdir (const vfs_path_t
* vpath
, gboolean update_prompt
, gboolean reset_prompt
);
53 void subshell_get_console_attributes (void);
54 void sigchld_handler (int sig
);
56 #endif /* HAVE_SUBSHELL_SUPPORT */
58 /*** inline functions ****************************************************************************/
60 #endif /* MC__SUBSHELL_H */