How to Terminate a Process Normally Created using ProcessBuilder

后端 未结 1 925
失恋的感觉
失恋的感觉 2020-12-19 09:18

I am creating Processes using ProcessBuilder in my Java Application. The created process executes some FFMPEG commands which actually copy the RTSP streams in specified dest

相关标签:
1条回答
  • 2020-12-19 10:05

    Maybe try...

    builder.inheritIO();
    System.exit(2);
    

    Or you could try to write to the stdin of the process...

    process.getInputStream().write(exitCode);
    
    0 讨论(0)
提交回复
热议问题