From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: system() hangs or returns incorrect value when child process killed Lines: 48 Organization: Pin Eight Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: X-Trace: +rUPLsdaVumzoFYkk95MYKo0XTnjTd/XwHNb84vGChcvSxppZ/lCO3190Mc093JxHerrbla7XzkP!m7FNvDAiPLJMnyuVLDp1EKipWlxDCOi0tnV7rTwRbLkPaRUv9zct2cL+WPGTl2VOmeLOG631SA== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 02 Jan 2000 22:16:48 GMT Distribution: world Date: Sun, 02 Jan 2000 22:16:48 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Eli Zaretskii" wrote: > On Sun, 2 Jan 2000, Steve Ball wrote: > > > Does anyone know a workaround for this bug? > > I didn't see any bugs in what you describe. It's all expected > behavior. Or as Micro$oft Knowledge Base states it: "This behavior is by design." It's not a bug; it's a feature. > > If the child process is killed using ^C or ^-Break, system() should return a > > value with SIGINT in bits 8-17. > > Ideally, yes; but it doesn't always work. DOS is very inconsistent in > this aspect, especially since many programs catch ^C and ^BREAK and do > custom things before they exit. And some programs: 1. catch Ctrl+C and make it copy the selection to the clipboard or 2. catch all keys in a custom key interrupt handler. (Most Allegro programs do this.) > In general, pressing ^C while the child program runs delivers the > signal SIGINT to its parent(s) as well, so the parent doesn't need to > do anything to terminate: it will be aborted automatically once the > child exits. So if a program catches SIGINT and maps it to Edit > Copy, then it will abort the parent when it's done? -- Damian Yerrick http://yerricde.tripod.com/ View full .sig: http://www.rose-hulman.edu/~yerricde/sig.html and now you must pay...