vim and emacs both trap Ctrl-Z in the terminal and implement custom behavior. If they didn't, I think, you would not be dropped gracefully into a shell prompt after pressing Ctrl-Z; instead, you'd be left with the terminal in non-canonical mode with the vim or emacs process suspended, and there would be nothing graceful about that.
In your case, there should be a way to trap attempted Ctrl-Z suspends in your process and break the locks (or do whatever you need to do).
I have a system where shell users run commands that can grab some locks, and they like to press ^Z to suspend them which isn't compatible with a simple fcntl-based lock.