how to execute c code securely
===

this is the scenario user will submit his c code to my server through browser.
the code will be compiled and executed on my server and output will be sent to the user.
since the user can submit any code (including Virus,other malfunctioning code). I will have to take care of that.
So my question is how can i secure my server from such code.