Apex operators are running in the Yarn container. Yarn may be killing the forks from the containers.
On Thu, Feb 9, 2017 at 11:03 AM Chris Benninger <[email protected]> wrote: Hi, I have a little bit of a weird use-case but I'm running a script from within an operator which forks a sub process using & (I know I know). Im porting this from spark as a PoC and in Apex It seems to be sending the parent shell process a SIGTERM resulting in a 143. When I remove the fork (altering the output) it all works fine however. my code: String cmd = "bash myscript.sh" Process p = Runtime.getRuntime().exec(cmd, null, workingDir.toFile()); p.waitFor(); BufferedReader stdoutReader = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while ((line = stdoutReader.readLine()) != null) { System.out.println(line); } BufferedReader stderrReader = new BufferedReader( new InputStreamReader(p.getErrorStream())); while ((line = stderrReader.readLine()) != null) { System.out.println(line); } int retValue = p.exitValue(); System.out.println("Exit code: "+retValue); Any help appreciated. -- *Join us at Apex Big Data World-San Jose <http://www.apexbigdata.com/san-jose.html>, April 4, 2017!* [image: http://www.apexbigdata.com/san-jose-register.html] <http://www.apexbigdata.com/san-jose-register.html>
