sending stdin to a daemon telnet process??
Posted on 2001-08-04
I need to port an application from Unix to NT/2000. On Unix, I have spawned a telnet application as a daemon process, and my applications can send information to it using telnets process ID. I want to be able to do the same within Windows. There are two parts to this question:
1) Within my application, how do I create a new process (running a console telnet application) which will persist even after the spawning application dies? I have a console version of telnet; however, I do not actually need to see the console. However, I need the telnet process to stay alive even after the spawning application dies so I can have other applications connect to it in the future.
2) How can I send messages to that telnet process, and have that process receive them as if they were comming from stdin? I believe I can redirect stdin if that would help.
please include sample code!