[Bug 860449] New: subprocess execution stdin/out malfunctioning
https://bugzilla.novell.com/show_bug.cgi?id=860449 https://bugzilla.novell.com/show_bug.cgi?id=860449#c0 Summary: subprocess execution stdin/out malfunctioning Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: x86-64 OS/Version: openSUSE 13.2 Status: NEW Severity: Major Priority: P5 - None Component: Java AssignedTo: bnc-team-java@forge.provo.novell.com ReportedBy: adev@leue.net QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=575831) --> (http://bugzilla.novell.com/attachment.cgi?id=575831) ProcessBug.java User-Agent: Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.15 The attached Java program communicates via stdin/out with the console from where it was started. Simultaneously, it calls in a different thread a subprocess and communicates with this subprocess via respective stdin/out streams. There is a process listener waiting in a thread for output from the subprocess. 1. if this listener is started, the program misbehaves 2. if the listener is not started, it works fine The problem arises in the line containing the expression "in.readLine()". This expression has the effect that the program detaches itself from the console (it says "[1]+ Stopped ./go.bash"). My guess is, that the stream is probably closed. I tested various combinations of parameters using the standard java ProcessBuilder class. I tried e.g. ProcessBuilder.Redireect.INHERIT and ProcessBuilder.Redirect.PIPE, but it shows the same behaviour, independent of these settings. Reproducible: Always Steps to Reproduce: 1.mkdir bug 2.cd bug 3.copy attached ProcessBug.java into the current "bug" folder 4.javac ProcessBug.java 5.java -cp .. bug.ProcessBug Actual Results: --- buggy output --------------------------------------------- user@host:bug> ./go.bash hi_there> foo starting process... started preparing... prepared sending input... sent hi_there_again> [1]+ Stopped ./go.bash user@host:bug> fg /go.bash bar done C-c user@host:bug> Expected Results: --- expeected output ------------------------------------------ user@host:bug> ./go.bash hi_there> foo starting process... started preparing... prepared sending input... sent hi_there_again> bar done C-c user@host:bug> Tested with jdk1.7.0_51 and jdk1.7.0_45 on Suse 13.2 It *does* work on twwo different linux systems using the exact same jdk packages. *** If this is actually a bug in the subprocess stdio mechanism, like *** a mixup of streams, this might be possibly better classified as critical, *** since many (old) programs might rely on the correct behaviour and the bug *** might have other severe consequences -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com