#endif /* READLINK_SYSCALL */
case READLINKAT_SYSCALL:
- /* Handle this readlinkat system call. */
- rc = handle_readlinkat (callno, ®s, tracee,
- &result);
+ /* This system call is already in progress if
+ TRACEE->waiting_for_syscall is true. */
- /* rc means the same as in `handle_exec'. */
+ if (!tracee->waiting_for_syscall)
+ {
+ /* Handle this readlinkat system call. */
+ rc = handle_readlinkat (callno, ®s, tracee,
+ &result);
+
+ /* rc means the same as in `handle_exec'. */
- if (rc == 1)
- goto report_syscall_error;
- else if (rc == 2)
- goto emulate_syscall;
+ if (rc == 1)
+ goto report_syscall_error;
+ else if (rc == 2)
+ goto emulate_syscall;
+ }
/* Fallthrough. */