× 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 Tim,

Haven't tried it... but, maybe a signal would work? Set up a signal handler with the sigaction() API, and then set up a 30 second (or whatever) alarm with the alarm() API. Then call stat(). I'm expecting that if stat() does not complete before the alarm is received, that the receiption of the SIGALRM signal will cause stat() to end with errno=EINTR.

I haven't tried it, though. It's only a guess at this point, but perhaps it's worth trying.



tim wrote:
Hello all and happy turkey day.


I am using the stat() function to check on a file on our windows server. Its
works great when the server is up, but when the server is down, it basically
locks the system up.


Is there a timeout or something I can do that if the server is down,it wont
lock up the iseries program on that statement?





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.