[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: signals, handeling the Control-D signal



On Tue, Jul 15, 2003 at 05:18:06AM -0400, Barry Pollock wrote:
> I need to trap the Control-D signal long enough for my program to run its
> quit program when using readline. I get an error in the strcpy function
> when using readline.so. If i disable readline first and allow the memory
> to be freed properly, the Control -D exit is proper.

Ctrl-D is not a 'signal' as such, but simply will cause any reads from stdin
to report EOF.

Pete

-- 
pdr    - Pete Ryland              - http://pdr.cx/info/about/
xmldb  - FAST 3-tier app server   - http://pdr.cx/projects/xmldb/
GNetMD - suite of tools for NetMD - http://pdr.cx/projects/gnetmd/

  'The glib supposition of utilizing atomic energy when our coal
     has run out is a completely unscientific Utopian dream, a
         childish bug-a-boo.'  - Robert A. Millikan, 1928



Reply to: