How to send interrupt key sequence to a Java Process?

前端 未结 1 1481

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)
提交回复
热议问题