In this post there is described how to start a program and then to send data to the stdin of the program (with FIFOs). But what to do if the program is already running, and I cannot re/start the program?
            Asked
            
        
        
            Active
            
        
            Viewed 473 times
        
    1 Answers
-1
            
            
        I once wrote a program to do the reverse (monitor output of an already started program). It's not a simple operation; it relies on using ptrace() to attach to the process and intercept system calls. When you detect a read() system call, inject the data.
 
    
    
        pjc50
        
- 1,720
- 10
- 12
 
    