How to send interrupt key sequence to a Java Process?

前端 未结 1 1480

I\'ve got a handle to a Java Process instance and its associated streams. It\'s a console program. I\'d like to simulate a break sequence. On Windows this is Ctrl-C. Is this pos

相关标签:
1条回答
  • 2021-02-05 18:49

    You probably want to look into SendSignal. This will send a ctrl-Break to a Java Process. I assume your goal is to cause a stack dump, which a CTRL-C (signal 3 aka SIGQUIT) will do for a running Java process?

    0 讨论(0)
提交回复
热议问题