The term you're looking for is IPC or Inter Process Communication. Theres lots of ways to do it on a linux system, not sure about the methods to do it on windows(though I know windows does do it own IPC with SMB so theres bound to be some methods).
The lazy man route would be to setup a file, and just read/write to that file. Or a network socket.
If all youre talking about is sending input to the stdin of the second process, then thats pretty easy many guides abound if you google.