I have a process builder that initiates a process that "tails" new line added to a really big log file.
Right now I'm
ProcessBuilder m_builder = new ProcessBuilder(fullCmdList);
m_builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
m_builder.redirectError(ProcessBuilder.Redirect.INHERIT);
Process m = m_builder.start();
m.waitFor();
redirecting output to stdout. Instead I'd like to detect when the process in question writes anything (I don't care what it writes) and trigger certain events.
Is there a way I can detect when a process writes it's first bit/byte to it's output stream when invoked via process builder?