How to compile and execute code dynamically?

There are several websites (for example, one ) that allows users to send code in different languages, and the system compiles and runs test cases on them. As a developer, I am curious to know how they do it and how they support several languages ​​(PHP, Python, C, .NET, javascript)?

Is it possible that the code presented could be malicious, thereby endangering the environment in which they execute the code?

Thank.

+5
source share
2 answers

I am interested to know how they do it and how they support several languages ​​(PHP, Python, C, .NET, javascript)?

: (, , ).

, , , ?

, . . Sandboxing , , , .. . , , .

+3

, , sandbox. . , API .

Chroot on * nix - .

0

All Articles