tsleep(9) return value when PCATCH specified
tsleep(9) with PCATCH causes the function to check for signals before and after sleeping, as mentioned in man page.
But PCATCH also lets signal wake up the process, and when this happens tsleep(9) returns 0 instead of EINTR.
Is above returning 0 expected behavior ?
From process perspective, there is no clear distinction between above and regular wakeup, hence unable to tell one from another.
It's clearer if it also returns EINTR or something non zero.