From: arcadepreserv AT hotmail DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: How Do I start another DOS program from DJGPP ? Date: Mon, 14 Feb 2000 08:28:25 GMT Organization: Deja.com - Before you buy. Lines: 48 Message-ID: <888eb8$4ng$1@nnrp1.deja.com> References: <38A32674 DOT A12A521E AT americasm01 DOT nt DOT com> NNTP-Posting-Host: 193.15.174.253 X-Article-Creation-Date: Mon Feb 14 08:28:25 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; TUCOWS) X-Http-Proxy: 1.0 x33.deja.com:80 (Squid/1.1.22) for client 193.15.174.253 X-MyDeja-Info: XMYDJUIDkivik To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article , djgpp AT delorie DOT com wrote: > > On Thu, 10 Feb 2000, Rolf Campbell wrote: > > > Eli Zaretskii wrote: > > > > > > int_handler > > > > { > > > > read_last_string_from_file("tempfile.txt"); > > > > process_that_string_quickly_since_we_are_in_an_interrupt; > > > > } > > > > > > That won't work (or, rather, will crash your system): you cannot safely > > > make DOS calls from a hardware interrupt handler, and reading from a file > > > requires a DOS call. > > > > But isn't the DJGPP timer interrupt really delayed until data is > > acessed, and then called from the page-fault handler? > > You are mixing two things: the DJGPP signal handlers and hardware > interrupt handlers. > > Signal handlers indeed run in a safe state, just like the rest of the > application code, so you can do anything from them, including DOS file > I/O. > > However, when a program calls DOS, signals are deferred until that > call returns. Since spawning a child program requires a DOS call, the > parent program will not get any signals until the child program exits. > > For this reason, I assumed that the original poster was talking about > a real hardware interrupt handler, not a signal handler. And DOS file > I/O cannot be done from a hardware interrupt handler. > Does this mean that this approach is possible ? If set up with a proper timer interrupt ? (How is this done?) Can I in DOS compiled by DJGPP have a file open fron the child program, and read the same file from the interrupt handler ? Is there a better way o accomplish this ? Sent via Deja.com http://www.deja.com/ Before you buy.