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





Scott Klement wrote:
I suspect that there's a class that's trying to write data to the stderr or stdout data stream, and it just assumes that it'll be available for use. When it's not available, it crashes.
I sort of thought that too, so I modified Barbara's program to open them to actual stream files in /home instead of /dev/null. But there was nothing in them after the program closed them.

On a Unix system the open would affect the current process. Any new processes would typically inherit the current processes open descriptors, so they'd be affected too. Normally when you call a program on a Unix system, you'll create a new process, run the program in the new process, and wait for it to complete. This creates something very similar to the "call stack" we have on i5/OS, allowing you to kill the called programs individually, handle their errors, etc. If the caller doesn't want to wait for the called program to complete, it doesn't have to, this allows multiple programs to run concurrently (much like submitting to batch on iSeries).

Anyway... the gist of it is that closing these descriptors would not affect your caller, it'd only affect processes that you create. Typically you'd close FD's 0-2 and open them pointing to /dev/null so that new processes would no longer have a connection to the terminal. This is useful when running what we think of as a "batch job" that doesn't have a connection to a terminal.

On iSeries, I don't know exactly how this works. Would it be scoped to the job, considering the job to be equivalent to a process? That'd make the most sense, but I don't know for sure. If it's scoped to the job, closing them could have repercussions on programs called later. You wouldn't have these problems on a Unix system unless your program that closed the FDs was called in the same process as the caller, which isn't the normal paradigm.
Do Unix programs typically expect their caller to have already opened the std io files?
There are 5 threads in JAVW status after my program has opened the spreadsheet. It's unclear to me how those threads relate to my program. Are they part of my program's call stack entry?

I suspect that they're part of the JVM, not your program.
So the JVM is created in my job's memory, but as independent threads that communicate by
pipes, semaphores, shared memory, common files, something else?

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /


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.