Re: System Exit Code 204

From: Tim Johnson <tim@johnsons-web.com>
Date: Wed Apr 19 2006 - 08:32:44 AKDT

* David Syzdek <syzdek@mosquitonet.com> [060418 22:36]:
> Tim,
 
  Hi David:
  Thanks for all of the info.

>
> However the highest error code I see is 131. If the error code is a
> system error you might try running the error code through strerror().
>
> err = some_func();
> printf("error: %s\n", strerror(err));
>
> There is more information in the errno(3) man page, however it does not
> provide numeric values of the errors.
 
> On a side note, C functions that read in data to populate a string often
> return how much data was actually read. For example, read() will return
> the number of bytes of data read from a file descriptor if successful or
> if unsuccessful return -1 and set errno.
 
  Right. And since all of the current web-development scripting
  languages use C for source, I often see CGI programmers getting
  incomplete data when they don't check return values from whatever
  syntax uses the underlying read() as source.

> Are you sure the call is not simply returning the number of bytes saved
> to the string?
 
  It is not, same error code everytime, regardless of string length.
  Are you in Alaska? I seem to recall mosquitonet as a 'local'
  (Fairbanks?) ISP.
  tim

> --David Syzdek
>
>
> http://lxr.linux.no/source/include/asm-generic/errno-base.h
> http://lxr.linux.no/source/include/asm-generic/errno.h
> http://www.linuxmanpages.com/man2/read.2.php
> http://www.linuxmanpages.com/man3/errno.3.php
> http://www.linuxmanpages.com/man3/strerror.3.php
>
>
>
> Tim Johnson wrote:
> >Hi:
> >
> >I'm using a programming language that executes a system call
> >on Linux Red Hat 9.0
> >
> >A system call to "ls" returns exit code 0 (as I would expect)
> >
> >A "buffered" system call -
> >which gathers results in a string, rather than printing to stdout
> >- to "ls" returns an exit code 204 which to this 'ol "C" dog signals an
> >error, however the results appear to be correct.
> >
> >So I'm curious as to whether 204 is a known linux system error code number
> >or
> >perhaps the language interpreter is "munging" the exit code.
> >
> >Any links to linux error code info would be appreciated.
> >thanks
> >tim
> >
>
> --
> Grief can take care of itself, but to get the full value
> of a joy you must have somebody to divide it with.
> -- Mark Twain
>
>
> --
> I know not with what weapons World War III will be fought, but World
> War IV will be fought with sticks and stones.
> -- Albert Einstein

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Apr 19 08:29:45 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 19 2006 - 08:29:45 AKDT