How to use PHP to call another CLI.exe process I/O in linux? -
i have cli.exe developed mono , want control php. idea let cli keep readline input, after this, can pid of cli. next, let php scripts send commands cli cli's input via pid(or else). don't know if there's php func can or how. appreciate!
if want communicate process via stdin/stdout, you'll need spawn php using proc_open, gives access these pipes.
to more closely match ask, i'd suggest named pipes or unix sockets. if cli.exe parent, use mkfifo system call create named-pipes. php has documentation here.
another alternative on *nix platforms unix domain sockets. typically these files named .sock extension under /var/run folder (or subdirs).
Comments
Post a Comment