Commit 9c543107 authored by rswindell's avatar rswindell
Browse files

Created EX_CHKTIME mode bit to check time left online while in external().

parent d99a59f5
......@@ -598,6 +598,8 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
// Executing app in foreground?, monitor
retval=STILL_ACTIVE;
while(!(mode&EX_BG)) {
if(mode&EX_CHKTIME)
gettimeleft();
if(!online && !(mode&EX_OFFLINE)) { // Tell VXD/VDD and external that user hung-up
if(was_online) {
sprintf(str,"%s hung-up in external program",useron.alias);
......@@ -1018,6 +1020,9 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
while(!terminated) {
if(waitpid(pid, &i, WNOHANG)!=0) /* child exited */
break;
if(mode&EX_CHKTIME)
gettimeleft();
if(!online && !(mode&EX_OFFLINE)) {
sprintf(str,"%s hung-up in external program",useron.alias);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment