summaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 04a9b9b4c1..75552a050c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2826,7 +2826,11 @@ void cpu_loop(CPUSH4State *env)
env->gregs[0],
env->gregs[1],
0, 0);
- env->gregs[0] = ret;
+ if (ret == -TARGET_ERESTARTSYS) {
+ env->pc -= 2;
+ } else if (ret != -TARGET_QEMU_ESIGRETURN) {
+ env->gregs[0] = ret;
+ }
break;
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */