TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: sysop (X)
from: Hannu Heikkinen 100315,1011
date: 1993-09-29 03:39:27
subject: #Errno Behaviour

#: 18949 S12/OS9/68000 (OSK)
    29-Sep-93  03:39:27
Sb: #Errno Behaviour
Fm: Hannu Heikkinen 100315,1011
To: sysop (X)

Hello !!

I have noticed following strange (??) behaviour concerning the
global 'errno' variable. The problem occurs inside a trap handler,
in this case my own library. If I for instance try to open a non
existent file with 'fopen' inside the trap, and the want to clean
up the 'errno' before returning to caller, just setting 'errno=0;' doesn't
work. But if I do the same trick for instance by attempting
a link to a non existent memory module with 'modlink', setting
'errno=0;' works  perfectly ok.

The problem is that I don't have complete access to the calling mechanism of
this trap, as a matter of fact don't even want to have
it, and the calling sw uses this 'errno' somehow, resulting to error on
caller's side.

What to do ??

Hannu


 

There are 2 Replies.

SOURCE: compuserve via textfiles.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™.