Wrap changing of syscall into nice function.

Warn instead of infinite loop in case of error.
2 files changed