How does the web server know that the output stdout for a pr

How does the web server know that the output (stdout) for a program is supposed to return to the program requester, rather than stdout on the server’s terminal

Solution

What actually happends behind a web server is that: when you execute a program on a web server, the server will internally run the program and whatever it got as output(like from stdout or from stderr) will be captured by server and send it back to the requester, and it will be displayed to the requester. Then if it is an input call statement to get some inputs from user, the user has to enter input to the web page, thus the entered input will again posted to the server, and the server will put that input from user to its internally runing program. In this way most of the onliner compiler web programs work.

How does the web server know that the output (stdout) for a program is supposed to return to the program requester, rather than stdout on the server’s terminalS

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site