On 7 June 2012 23:24, Richard Henderson <[email protected]> wrote: > @@ -5880,12 +5880,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long > arg1, > mask = arg2; > target_to_host_old_sigset(&set, &mask); > > - ret = get_errno(sigprocmask(how, &set, &oldset)); > - > - if (!is_error(ret)) { > + ret = sigprocmask(how, &set, &oldset); > + if (is_error(ret)) { > + ret = get_errno(ret); > + } else {
This looks kinda bogus. get_errno() is supposed to be used on something which is a (value-or-negative-for-target-errno) value, eg what you get out of get_errno(). If you're just testing the straight return value from the host sigprocmask() then "if (ret == -1)" or similar would be better. -- PMM
