What is the preferred cross-platform IPC Perl module?

前端 未结 2 1439
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 09:59

I want to create a simple IO object that represents a pipe opened to another program to that I can periodically write to another program\'s STDIN as my app runs. I want it to be

2条回答
  •  爱一瞬间的悲伤
    2021-02-07 10:24

    I've done something similar to this. Although it depends on the parent program and what you are trying to pipe. My solution was to spawn a child process (leaving $SIG{PIPE} to function) and writing that to the log, or handling the error in what way you see fit. I use POSIX to handle my child process and am able to utilize all the functionality of the parent. However if you're trying to have the child communicate back to the parent - then things get difficult. Do you have an example of the main program and what you're trying to PIPE?

提交回复
热议问题