× 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.





Actually I coded up an example that uses setitimer() and also avoids the
problem discussed in the paragraph above.  My example also uses signals to
terminate the program gracefully.  My example is in C but you could call
RPG subprocedures from the C code to do what you want.  My example is
here:
http://archive.midrange.com/c400-l/200511/msg00007.html

I don't see how your code solves the problems I discussed (aside from the fact that all it does is print a message, and there's no way that could take that long.

Also, your code doesn't run on the iSeries -- at least not on my V5R3 system. It crashes immediately with a floating point error, and never even gets to the point of calling setitimer().

It also uses the signal() API which is slow because it saves the program stack when it receives a signal and restores it when the signal handler exits. This behavior is annoying because it also means you can't use global variables to communicate with your signal handler.

I don't understand why you think a Linux C solution is an appropriate answer for an iSeries RPG question.

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.