I want to debug my cgi script (C++) from IDE, so I would like to create a \"debug mode\": read file from disk, push it to own stdin, set some environment variables, that corresp
You can't "push to own stdin", but you can redirect a file to your own stdin.
freopen("myfile.txt","r",stdin);