java - How does the JVM determine where FileDescriptor.out (STDOUT) goes on Windows? -
i have issue hovering somewhere between jvm , windows, , fear i'm not knowledgeable plenty either inquire question well, here goes:
i have non-java code (it's sas scl code, i'm hoping knowledge of sas isn't necessary reply this) launches java process , redirects stdout , stderr streams sas's conception of named pipe. java process writes text system.out. sas code attempts read text pipe.
this has worked long time on many systems, problems have cropped on windows. issues might specific java 7 (though perchance java 6 well), and/or possibly specific windows 7 , later.
there 2 contexts code may called. in 1 context, works fine; in other, sas doesn't see output java process (which appears running based on other output). when doesn't work, 'fread' phone call appears block until java process complete; however, phone call returns 'eof'.
(specifically: if run sas workspace server process, works. if runs batch-mode sas, doesn't. i'm not clear different between these 2 environments, though process owner different.)
in case doesn't work, briefly see windows console window contains stdout output sas should isn't seeing. in case work, don't see such window, might result of process running under different os user 1 i'm logged in as.
given that, guess question is: how jvm determine stdout ends up? jvm writing output console window instead of desired stdout stream connected sas pipe? salient aspects of environment jvm looks @ when making determination?
edit 2013-02-20:
further investigation shows when launching java process, sas following:
cmd /c <java command>
this done in both contexts in code run.
i tested java 5, , behavior same java 7: doesn't appear java version-specific.
windows 7+ mutual thread. i'm guessing related the new conhost.exe process added in windows 7/windows server 2008 r2.
java windows jvm sas
No comments:
Post a Comment