Path: 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 > >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