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

No, not at all; it should definitely not close those descriptors.  It
may coincidentally open those descriptors, but it is just as likely to
open descriptors 14-16, or maybe 14, 25, 34.  It just seems to be
necessary to have at least 3 descriptors open for some aspects of Java
I/O to work correctly.

Now I'm REALLY confused. The link you provided earlier in the thread points to a C language example. That example is supposed to demonstrate the following (this is a quote from the Information Center):

   When using the Invocation API to run Java programs, the destination for
   STDOUT and STDERR is controlled by the use of an environment variable
   called QIBM_USE_DESCRIPTOR_STDIO. If this environment variable is set
   to Y or I (for example, QIBM_USE_DESCRIPTOR_STDIO=Y), the Java virtual
   machine uses file descriptors for STDIN (fd 0), STDOUT (fd 1), and
   STDERR (fd 2). In this case, the program must set these file descriptors
   to valid values by opening them as the first three files or pipes in this
   job. The first file opened in the job is given fd of 0, the second fd
   of 1, and third is fd of 2. If the environment variable
   QIBM_USE_DESCRIPTOR_STDIO is not set or is set to any other value, file
   descriptors are not used for STDIN, STDOUT, or STDERR. Instead, STDOUT
   and STDERR are routed to a spooled file that is owned by the current job,
   and use of STDIN results in an IO exception.

This quote is from the followng page:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaha/invocapi.htm

I don't believe the descriptors are actually used for the 3 I/O streams by Java. At least, all the evidence I have seen suggests that they aren't used.

So I'm really confused if you're telling me that they don't have to be 0, 1 and 2! Isn't that what the above paragraph is telling me?

I guess you might be saying that 0-2 must be open, but there's no easy way to detect it? So you just open 3 FDs and if they're 0-2, great they'll be used, if not you haven't done any harm by opening a few extra FDs?


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.