#: 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.
|