🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #1529

Re: C6.00 and errno

#1529
From: Jack Hudler
Date: Sat, 22 Sep 1990 07:33
30 lines
1214 bytes
>
>The errno.h header file claims errno is set by "system functions".
>Does anyone know how to set errno in C6.0?
>
Yes, you are correct about the thread influence on errno.

Setting errno is pretty no-standard as your finding out, perhaps a 
better way might be to add your own error handling system. Such as;

..
n = read(fd,&i,2);
if (n<0)
  SetOurError(errno);	// to trap system errors
..
  SetOutError(some_error_number);	// and to generate your own.
..

or; (if your a fan of Global Variables)

..
n = read(fd,&i,2);
if (n<0)
  ErrorCode=errno;	// to trap system errors
..
  ErrorCode=some_error_number;	// and to generate your own.
..

-- 
Jack           Computer Support Corporation             Dallas,Texas
Hudler         Internet: jack@cscdec.cs.com
Technical Details
Message-ID: <68@cscdec.cs.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!samsung!cs.utexas.edu!execu!sequoia!uudell!bigtex!texsun!csccat!cscdec!jack
References: <1#19@dialogic.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!samsung!cs.utexas.edu!execu!sequoia!uudell!bigtex!texsun!csccat!cscdec!jack
From: jack@cscdec.cs.com (Jack Hudler)
Newsgroups: comp.os.os2.programmer
Subject: Re: C6.00 and errno
Message-ID: <68@cscdec.cs.com>
Date: 22 Sep 90 07:33:21 GMT
References: <1#19@dialogic.UUCP>
Reply-To: jack@cscdec.cs.com (Jack Hudler)
Organization: Computer Support Corporation. Dallas,Texas
Lines: 30