Debian Codegraph @

iproc.h

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