[comp.unix.questions] Signals and dbx

coleman@cam.nist.gov (Sean Sheridan Coleman X5672) (02/05/91)

Does ^D produce a signal ? If so, what signal am I looking for?

Also, I have a Sun and am using dbxtool. I wanted hve my
program catch the ^Z (susp) signal. I told dbx to ignore 
the TSTP signal using the ignore command. When I ran the 
program in dbx and did ^Z, dbx stopped and didn't pass the
signal to the process. In dbxtool, I type ^Z and all that
happend was that ^Z was echoed and the signal wasn't passed
to my process.  Is there something I am doing wrong?


Sean Coleman
coleman@bldrdoc.gov
NIST
Boulder, CO

gwyn@smoke.brl.mil (Doug Gwyn) (02/06/91)

In article <6992@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes:
>Does ^D produce a signal ?

Not under normal circumstances.  Usually that character is used to
delimit chunks of input text; whatever has been typed (in canonicalizing
mode) up to the so-called EOF character is made available for reading
and the EOF character is discarded.  No signal is involved.

enag@ifi.uio.no (Erik Naggum) (02/06/91)

In article <15091@smoke.brl.mil>, Doug Gwyn writes:
   In article <6992@alpha.cam.nist.gov>, Sean Sheridan Coleman X5672 writes:
   >Does ^D produce a signal ?

   Not under normal circumstances.  Usually that character is used to
   delimit chunks of input text; whatever has been typed (in canonicalizing
   mode) up to the so-called EOF character is made available for reading
   and the EOF character is discarded.  No signal is involved.

Perhaps the special case that makes people believe that ^D is more
special than it is should be elaborated upon.  When you have _not_
typed anything before the so-called EOF character, the read(2) system
call returns the number of characters read, which is 0.  Recall that 0
from read(2) is the canonical End Of File indication, unless other
provisions have been made (such as O_NDELAY).

--
[Erik Naggum]					     <enag@ifi.uio.no>
Naggum Software, Oslo, Norway			   <erik@naggum.uu.no>