Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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.

share|improve this answer

we use buildbot in our company.

share|improve this answer

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

https://fedorahosted.org/koji/wiki

It uses Mock

http://fedoraproject.org/wiki/Projects/Mock

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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