Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uwm.edu!lll-winken!iggy.GW.Vitalink.COM!widener!netnews.upenn.edu!msuinfo!convex.cl.msu.edu!jap From: jap@convex.cl.msu.edu (Joe Porkka) Newsgroups: comp.sys.amiga.programmer Subject: Re: Dumb windows from SAS/C programs on Workbench Message-ID: <1991May19.032427.5111@msuinfo.cl.msu.edu> Date: 19 May 91 03:24:27 GMT References: <1991May14.164909.19186@NCoast.ORG> <1991May16.035621.7979@bilver.uucp> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 23 alex@bilver.uucp (Alex Matulich) writes: >In article <1991May14.164909.19186@NCoast.ORG> davewt@NCoast.ORG (David Wright) writes: >> On a related note, what do you have to do to kill the CTRL-C trapping >>their startup code puts in by default. I have my own trapper which worked >>fine in Draco programs, but SAS/C seems to grab the signals before I have >>a chance to see them, and is dumping my programs without giving me a chance to >>clean up, close files, etc. >This is what works for me, on every platform I've tried, including Amiga: >#include >void ctrlctrap(int); /* prototype for ctrl-c trap handler */ >main() >{ >signal(SIGINT, ctrlctrap); /* cause ctrl-c to execute ctrlctrap() */ Even better simply signal(SIGINT, SIGIGN); /* Ignore the signal completely */ Or you modify the startup code yourself - all the source code for it is included.