Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!uakari.primate.wisc.edu!crdgw1!ge-dab!tarpit!bilver!alex From: alex@bilver.uucp (Alex Matulich) Newsgroups: comp.sys.amiga.programmer Subject: Re: Dumb windows from SAS/C programs on Workbench Message-ID: <1991May21.160817.11000@bilver.uucp> Date: 21 May 91 16:08:17 GMT References: <1991May14.164909.19186@NCoast.ORG> <1991May16.035621.7979@bilver.uucp> <1991May19.032427.5111@msuinfo.cl.msu.edu> Organization: W. J. Vermillion - Winter Park, FL Lines: 27 jap@convex.cl.msu.edu (Joe Porkka) writes: >alex@bilver.uucp (Alex Matulich) writes: >>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. > >>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 */ Yes, I thought of posting that one too. I didn't because when I tried using SIGIGN in MSDOS, you would see ^C somewhere on the screen every time you pressed ctrl-c or ctrl-break. The solution I found was to just pass the address of your ctrl-c trap handler instead. Then it works silently. -- _ |__ Alex Matulich /(+__> Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817 //| \ UUCP: alex@bilver.uucp ...uunet!tarpit!bilver!alex ///__) bitnet: IN%"bilver!alex@uunet.uu.net"