hi John,

-1 indicates an error.
0 or higher is a valid descriptor.

There should never be any other negative numbers (besides -1) returned by the socket() API. But, are you certain that the -250 to -350 is returned by the API? How would you know that, do you have the source code?

It seems to me that the sockets used by CGI are build/handled by Apache. and the sockets used by SNDM are built/used by SNDM. So I don't see why you'd ever see a socket descriptor yourself?


On 9/30/2011 7:55 AM, Maassel, John R. wrote:


We've been running the SNDM command without trouble for years. Now
we're seeing a large number of sends failing because of an invalid
socket descriptor (the integer returned by the socket() function and
passed to all other functions, like connect(), select(), etc.).
They're in the -250 to -350 range and another piece of SNDM is
rejecting this as invalid as it's less than zero.

I checked the API for the socket() API and it describes 2 return
codes: -1 if there was an error, or 'n' if there was not.

It doesn't say whether n is supposed to be positive, but other
platforms I've coded on (and with the file descriptor for open() on
the i) expect the socket to be positive.

Are negatives allowed? If they are not, why is the system suddenly
returning negative sockets? We upgraded from V5R4 to 6.1 about a
month ago.

What may or may not be related is we're seeing a bunch of this
happening in CGI jobs.

Any advice will help. Thanks.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.