Project

General

Profile

Actions

Bug #3184

open

tsleep(9) return value when PCATCH specified

Added by tkusumi almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
04/03/2019
Due date:
% Done:

0%

Estimated time:

Description

tsleep(9) with PCATCH causes the function to check for signals before and after sleeping, as mentioned in man page.
https://www.dragonflybsd.org/cgi/web-man?command=tsleep&section=9

But PCATCH also lets signal wake up the process, and when this happens tsleep(9) returns 0 instead of EINTR.
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/kern/kern_synch.c#L628

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.

No data to display

Actions

Also available in: Atom PDF