Fixed the rlimit issue

Before that if the sub-process has hit an rlimit it would hang the
whole program or crash. Now it reports a (somewhat obscure) error
message.

The error message is so strange because when the process hits a memory
limit it is basically being terminated with SIGKILL, so there is not
much information we can extract from that.