This lock is non-blocking, it will die with a exception, and if this is run from cron, then a mail with the error will be sent to the root account.

I'm not against that, it can even be a feature to notify the administrator that those processes are trying to overlap. But just want to make sure that this is the behaviour you desire.

For a blocking lock there is EBox::Util::SHMLock