| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | redirection |
FT> > HdA> So how can i redirect my info (printf) to a file, > HdA> when the program traps? > > try (f)pritf(stderr), look up atexit() if on your compiler FT> Note: `atexit' is a function of the Standard C RTL, and doesn't necessarily map to an operating system function. In many C++ compilers, `atexit' merely manipulates a table maintained by the RTL, which is scanned by the `exit' function. If the program exits abnormally (as it does in Hank's case, with a SYS317x) then the `exit' function is not called (the `exit' function is _not_ a system API function). To catch abnormal program termination, one _must_ use an exception handler, or a RTL function that maps onto it (such as `signal' -- although not all of the power of OS/2 exception handling is available through `signal'). > JdeBP < ___ X MegaMail 2.10 #0: --- Maximus/2 3.01* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4) SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 440/4 141/209 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.