home *** CD-ROM | disk | FTP | other *** search
- Filename: EMP-HANG.MOD
- Authors: Adam Caldwell (1@6470 Net, 1@16470 Link) and Wayne Bell (1@1 Net)
- Purpose: This provides a way for a program which performs its I/O through DOS
- to be signaled of a hangup.
- Written for: WWIV 4.21a - Will probably work with 4.2x with no prob, and 4.1x
- with a little effort. This code will be obsolete for WWIV 4.22.
-
- In Extern.C, int newintr() make the noted changes:
-
- checkhangup();
- if (hangup) {
- if (hanguptime1<0L) {
- hanguptime1=timer1();
- if (funcs[20]) { /* Add */
- outs("Terminating...\r\n"); /* Add */
- ip=FP_OFF(funcs[20]); /* Add */
- cs=FP_SEG(funcs[20]); /* Add */
- funcs[20]=(void far *)36; /* Add */
- } else { /* Add */
- outs("Aborting...\r\n"); /* Existing line... indent */
- ni_r.x.ax=0x4c00; /* ditto */
- int86x(save_dos,&ni_r,&ni_r,&ni_s); /* ditto */
- } /* Add */
- } else {
- if (((unsigned long) funcs[20])>500) /* Add */
- funcs[20]=(void far *)36; /* Add */
- if (labs(timer1()-hanguptime1)>(long)funcs[20]) { /* Modify */
- hanguptime1=timer1();
- outs("Aborting...\r\n");
- ni_r.x.ax=0x4c00;
- int86x(save_dos,&ni_r,&ni_r,&ni_s);
- }
- }
- }
-
-
- Now, in do_it(char *cl), add the line noted:
-
- ss[i]=NULL;
- i=spawnvpe(P_WAIT,ss[0],ss,xenviron);
- funcs[20]=NULL; /* Add */
-
- That's all there is to it...
-