bounds checking for wwsmap
[unix-history] / usr / src / usr.bin / window / wwclose.c
CommitLineData
21296b85 1#ifndef lint
959c9e00 2static char *sccsid = "@(#)wwclose.c 3.3 83/08/23";
21296b85
EW
3#endif
4
5#include "ww.h"
6#include <signal.h>
7
8wwclose(w)
9register struct ww *w;
10{
85af59e4
EW
11 wwindex[w->ww_index] = 0;
12 if (w->ww_state == WWS_HASPROC)
13 (void) kill(w->ww_pid, SIGHUP);
14 (void) close(w->ww_tty);
15 (void) close(w->ww_pty);
489d8a09
EW
16 wwfree((char **)w->ww_win);
17 wwfree((char **)w->ww_cov);
18 wwfree((char **)w->ww_buf);
85af59e4 19 free((char *)w);
21296b85 20}