Skip to content

Commit

Permalink
OS-3572 lxbrand fix various sigwaitinfo failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Perkin committed Nov 19, 2014
1 parent 140d337 commit e12924e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions usr/src/lib/brand/lx/lx_brand/common/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,9 @@ lx_rt_sigwaitinfo(uintptr_t set, uintptr_t sinfo, uintptr_t setsize)
return (-errno);

if (s_sinfop == NULL)
return (rc);
return (stol_signo[rc]);

return ((stol_siginfo(s_sinfop, sinfop) != 0) ? -errno : rc);
return ((stol_siginfo(s_sinfop, sinfop) != 0) ? -errno : stol_signo[rc]);
}

long
Expand All @@ -880,14 +880,18 @@ lx_rt_sigtimedwait(uintptr_t set, uintptr_t sinfo, uintptr_t toutp,

s_sinfop = (sinfop == NULL) ? NULL : &s_sinfo;

/*
* "If timeout is the NULL pointer, the behavior is unspecified."
* Match what LTP expects.
*/
if ((rc = sigtimedwait(&s_set, s_sinfop,
(struct timespec *)toutp)) == -1)
return (-errno);
return (toutp == NULL ? -EINTR : -errno);

if (s_sinfop == NULL)
return (rc);
return (stol_signo[rc]);

return ((stol_siginfo(s_sinfop, sinfop) != 0) ? -errno : rc);
return ((stol_siginfo(s_sinfop, sinfop) != 0) ? -errno : stol_signo[rc]);
}

#if defined(_ILP32)
Expand Down

0 comments on commit e12924e

Please sign in to comment.