I'm trying to achieve similar functionality in a server for community programming and I've drafted this to wrap up another take on oneide's functions: From a Perl CGI I build a script like this (not even pseudocode):

compiler_response = timeout (params) compiler (params)
result = timeout compiledprogram (params)
save result in database

I think timeout is the tool I need to restrain the program from executing or compiling more than X seconds, The problem I have is that I need to limit the compiled program from writing to anything other than STDOUT or reading from anything other than STDIN. Also I need to limit the size of the program to a certain limit, 128KB for example, and the ammount of RAM it can use, 64 MB for example.

What are the proper tools to do this from bash? Thanks in advance.


LibreOffice and KDE use icecream & ccache for building faster their gigantic code source.

  • Ccache keeps many compiling information available for gcc/g++ for next one.
  • Icecream allows to compile remotely with a classical master/slave approach

They works really well, are easy to set up and are already integrated in many Linux distributions. On libreoffice, build time goes from 4 hours to 30 minutes.

If you do not plan to compile using gcc, maybe you can enhance one of those tools.


we use buildbot in our company.


I have not tried this before, but you could try using Koji of FedoraProject, this one builds RPM from the code tarballs.


It uses Mock


If your code is all about Java/.NET enterprise stuff, Hudson can be really cool http://wiki.hudson-ci.org/display/HUDSON/Home

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.