× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi all,

I would like to know if anybody knows what will happen to a socket descriptor if alarm is used as a timeout mechanism.

If, for example, we have the following scenario:

alarm(1);
call routine to post some data via a socket (via a httpapi routines)
alarm(0);

Assuming the alarm is fired due to the post taking more than a second to complete, what would happen to the socket descriptor? Does it get closed when interrupted or do we have a leak here?

We are getting some jobs with the dreaded "too many open files for process" error and I'm wondering if this code could be the culprit.

Would the open socket descriptors start piling up if interrupted in this way?

Any and all ideas are welcome.

Cheers

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.