Grading Program - compiling / executing C ++ code in C ++

I am writing a program for evaluating C ++ code that students present. Now it uses a system call to compile each source file, then redirects the input file to a file and calls new executable files in the processes and looks for output for certain lines. It also allows me to have a timeout for processes for emergency programs.

Is there a better way to do this than a system call? Or is the best way to do this overall?

+1
source share
2 answers

You might want to run programs under an alternative account, for example. Key based authentication ssh is a good way to switch to a dummy account.

- , expect ( Tcl) .

+2

All Articles