Skip to content
Snippets Groups Projects
Commit 9b0d37c0 authored by deuce's avatar deuce
Browse files

Stop using SIGIO for stdin... many terminals apparently will send this when

ready for WRITE also... so it's useless.
parent 7144720e
No related branches found
No related tags found
No related merge requests found
......@@ -198,23 +198,24 @@ tODResult ODKrnlInitialize(void)
act.sa_flags=SA_RESTART;
sigemptyset(&(act.sa_mask));
sigaction(SIGALRM,&act,NULL);
itv.it_interval.tv_sec=1;
itv.it_interval.tv_usec=0;
itv.it_value.tv_sec=1;
itv.it_value.tv_usec=0;
itv.it_interval.tv_sec=0;
itv.it_interval.tv_usec=10000;
itv.it_value.tv_sec=0;
itv.it_value.tv_usec=10000;
setitimer(ITIMER_REAL,&itv,NULL);
/* Make stdin signal driven. */
act.sa_handler=sig_get_char;
act.sa_flags=0;
sigemptyset(&(act.sa_mask));
sigaction(SIGIO,&act,NULL);
/* Have SIGIO signales delivered to this process */
fcntl(0,F_SETOWN,getpid());
/* Enable SIGIO when read possible on stdin */
fcntl(0,F_SETFL,fcntl(0,F_GETFL)|O_ASYNC);
/* act.sa_handler=sig_get_char;
/* act.sa_flags=0;
/* sigemptyset(&(act.sa_mask));
/* sigaction(SIGIO,&act,NULL);
/*
/* /* Have SIGIO signals delivered to this process */
/* fcntl(0,F_SETOWN,getpid());
/*
/* /* Enable SIGIO when read possible on stdin */
/* fcntl(0,F_SETFL,fcntl(0,F_GETFL)|O_ASYNC); */
/*/
/* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */
sigemptyset(&block);
......@@ -368,9 +369,9 @@ ODAPIDEF void ODCALL od_kernel(void)
#ifndef OD_MULTITHREADED
/* If not operating in local mode, then perform remote-mode specific */
/* activies. */
#ifndef ODPLAT_NIX /* On *nix, this is handled by signals */
if(od_control.baud != 0)
{
#ifndef ODPLAT_NIX /* On *nix, this is handled by signals */
/* If carrier detection is enabled, then shutdown OpenDoors if */
/* the carrier detect signal is no longer high. */
if(!(od_control.od_disable&DIS_CARRIERDETECT))
......@@ -381,6 +382,7 @@ ODAPIDEF void ODCALL od_kernel(void)
ODKrnlForceOpenDoorsShutdown(ERRORLEVEL_NOCARRIER);
}
}
#endif
/* Loop, obtaining any new characters from the serial port and */
/* adding them to the common local/remote input queue. */
......@@ -389,7 +391,6 @@ ODAPIDEF void ODCALL od_kernel(void)
ODKrnlHandleReceivedChar(ch, TRUE);
}
}
#endif
#ifdef ODPLAT_DOS
check_keyboard_again:
......
......@@ -619,7 +619,7 @@ BOOL ODTimerElapsed(tODTimer *pTimer)
end.tv_sec=pTimer->Start.tv_sec+(pTimer->Duration / 1000);
end.tv_usec=((pTimer->Start.tv_usec)+((pTimer->Duration)*1000))%1000000;
gettimeofday(&tv,NULL);
return(end.tv_sec >= tv.tv_sec && end.tv_usec >= tv.tv_usec);
return((end.tv_sec >= tv.tv_sec) && (end.tv_usec >= tv.tv_usec));
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment