DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34461>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34461





------- Additional Comments From [EMAIL PROTECTED]  2005-09-29 18:39 -------
(In reply to comment #7) 
> Ok, so it is an input hooking up thing. I guess when you run ant in the 
> background, the moment anything tries to listen to stdin it hangs until 
brought 
> to the fg. 
 
Yes. From bash's manpage: 
 
"Background processes which attempt to read from (write to) the terminal are 
sent a SIGTTIN (SIGTTOU) signal by the terminal driver, which, unless caught, 
suspends the process." 
 
Now I'm wondering how to detect this situation in java-land. When you try to 
read, you get an IOException: 
 
     [java] java.io.IOException: Unknown error 512 
     [java]     at java.io.FileInputStream.readBytes(Native Method) 
     [java]     at java.io.FileInputStream.read(FileInputStream.java:194) 
     [java]     at 
java.io.BufferedInputStream.fill(BufferedInputStream.java:183) 
     [java]     at java.io.BufferedInputStream.read1
(BufferedInputStream.java:222) 
     [java]     at 
java.io.BufferedInputStream.read(BufferedInputStream.java:277) 
     [java]     at java.io.FilterInputStream.read(FilterInputStream.java:90) 
     [java]     at 
org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:90) 
     [java]     at java.lang.Thread.run(Thread.java:534) 
 
but how would know if you can read or not? As soon as you attempt to read, 
you're being stopped SIGTTIN. 
 
> question, is, what is doing the read? The sample app isnt,  
[...] 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=24918 
 
See the above stacktrace. 
 
Java.setupRedirector() sets the inputStream for redirection, where it ends up 
in a StreamPumper (somewhere in Redirector.createStreams()). The StreamPumper 
immediately starts reading from the input stream, causing the SIGTTIN. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to