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



Did the code come through? I never saw it.

Patrick Conner
www.ConnecTown.com
(828) 244-0822



                    Tom Daly
                    <Tdaly@sddsystems        To:     "'rpg400-l@midrange.com'" 
<rpg400-l@midrange.com>
                    .com>                    cc:
                    Sent by:                 Subject:     RE: socket problem
                    rpg400-l-admin@mi
                    drange.com


                    12/20/01 09:52 PM
                    Please respond to
                    rpg400-l







Scott,

Good ideas. I'm doing blocking reads.  The select has *null for the
write and error sets.  The timeout is 3 seconds.  When I do a WRKACTJOB
I see SELW status and high CPU%... it's the top running job on the
system!

I'll get the relevent code... sit tight.

Tom

-----Original Message-----
From: Scott Klement
To: 'rpg400-l@midrange.com'
Sent: 12/20/01 6:52 PM
Subject: RE: socket problem


Are these blocking or non-blocking sockets?

If they're non-blocking, is it possible that the select() is returning
immediately, even if theres no data to read?  This would cause it to
loop
from select() to read(), etc, taking up lots of CPU.

the most common cause I've seen for this is specifying a write or
exception descriptor set to select() in addition to a read, when that's
not really what the programmer meant to do.  Because a set of write
descriptors was given, and because there's still space in the write
buffer, select() always returns immediately.    Since you're only trying
to read from it, it loops and wastes CPU.

I'd recomment running the program in debug, and seeing exactly what
it's doing.   If it's truly stopping at the select() call, then it
shouldn't be using CPU, it should sit at "SELW" status.

If nothing else works, post the relevant section of code to this list,
and I'll see if a problem jumps out at me :)



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.







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.