1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
/************************************************************************
* This program is Copyright (C) 1986-1996 by Jonathan Payne. JOVE is *
* provided to you without charge, and with no warranty. You may give *
* away copies of JOVE, including sources, provided that this notice is *
* included in all the files. *
************************************************************************/
#ifdef IPROCS /* the body is the rest of this file */
typedef struct process *Process; /* process reference (opaque type) */
# ifdef PIPEPROCS
extern char Portsrv[FILESIZE]; /* path to portsrv program (in LibDir) */
extern int NumProcs;
# define KBDSIG SIGUSR1 /* used for shoulder tapping */
/* Messages from kbd and portsrv to jove.
* We depend on writes to a pipe being atomic.
* This seems to be the case if the write is short enough (<4k?)
* but not documented in the UNIX manuals.
*/
struct header {
pid_t pid; /* sender */
int nbytes; /* data length */
};
struct lump {
struct header header;
char data[128]; /* data being sent */
};
extern File *ProcInput;
extern pid_t kbd_pid;
extern void kbd_strt proto((void));
extern bool kbd_stop proto((void));
extern void read_pipe_proc proto((pid_t, int));
extern void kbd_kill proto((void));
# else /* !PIPEPROCS */
extern void read_pty_proc proto((int));
extern SIGRESTYPE sigchld_handler proto((int));
extern volatile bool procs_to_reap;
extern void reap_procs proto((void));
# endif /* !PIPEPROCS */
extern void
closeiprocs proto((void)),
untieDeadProcess proto((Buffer *));
extern bool
KillProcs proto((void));
extern const char
*dbxness proto((Process)),
*pstate proto((Process));
extern pid_t DeadPid; /* info about ChildPid, if reaped by kill_off */
extern wait_status_t DeadStatus;
extern void
kill_off proto((pid_t, wait_status_t));
/* Commands: */
extern void
ProcInt proto((void)),
DBXpoutput proto((void)),
Iprocess proto((void)),
ShellProc proto((void)),
ProcQuit proto((void)),
ProcKill proto((void)),
# ifdef PTYPROCS
ProcCont proto((void)),
ProcDStop proto((void)),
ProcEof proto((void)),
ProcStop proto((void)),
# endif
ProcSendData proto((void)),
ProcNewline proto((void)),
ProcList proto((void));
/* Variables: */
extern char
proc_prompt[128], /* VAR: process prompt */
dbx_parse_fmt[128]; /* VAR: dbx-mode parse string */
#endif /* IPROCS */
|