(exit_subshell): return gboolean instead of int.
[midnight-commander.git] / src / subshell.h
blobb76708bf157cca8fbc67ba622379095be42e06f4
1 /** \file subshell.h
2 * \brief Header: concurrent shell support
3 */
5 #ifndef MC__SUBSHELL_H
6 #define MC__SUBSHELL_H
8 /*** typedefs(not structures) and defined constants **********************************************/
10 /*** enums ***************************************************************************************/
12 /* State of the subshell; see subshell.c for an explanation */
14 enum subshell_state_enum
16 INACTIVE,
17 ACTIVE,
18 RUNNING_COMMAND
21 /* For the `how' argument to various functions */
22 enum
24 QUIETLY,
25 VISIBLY
28 /*** structures declarations (and typedefs of structures)*****************************************/
30 /*** global variables defined in .c file *********************************************************/
32 extern enum subshell_state_enum subshell_state;
34 /* Holds the latest prompt captured from the subshell */
35 extern char *subshell_prompt;
37 extern gboolean update_subshell_prompt;
39 /*** declarations of public functions ************************************************************/
41 void init_subshell (void);
42 int invoke_subshell (const char *command, int how, vfs_path_t ** new_dir);
43 int read_subshell_prompt (void);
44 void do_update_prompt (void);
45 gboolean exit_subshell (void);
46 void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt);
47 void subshell_get_console_attributes (void);
48 void sigchld_handler (int sig);
50 /*** inline functions ****************************************************************************/
52 #endif /* MC__SUBSHELL_H */