A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=1087 ====================================================================== Reported By: philip-guenther Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1087 Category: System Interfaces Type: Error Severity: Objection Priority: normal Status: New Name: Philip Guenther Organization: OpenBSD User Reference: Section: truncate Page Number: 2178 Line Number: 69754 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2016-10-14 05:07 UTC Last Modified: 2016-10-14 07:48 UTC ====================================================================== Summary: truncate() should behave like write() and generate SIGXFSZ for the thread instead of the process ======================================================================
---------------------------------------------------------------------- (0003414) shware_systems (reporter) - 2016-10-14 07:48 http://austingroupbugs.net/view.php?id=1087#c3414 ---------------------------------------------------------------------- I agree this appears to be an oversight from when <pthread.h> first appeared, but I'd expect the desired change to break existing implementations and applications that rely on them. Something like a pthread_truncate(same params) might be better as providing that functionality, as an XSI addition specific to truncate(), or some other method of indicating that is the behavior the application wants. For a generic capability, adding SA_THREADFIRST as a sigaction flags option, with the behavior that a particular signal shall be queued to the main thread of a process only if a thread has the signal blocked or set to SIG_IGN, is another possibility. The main thread could set a signal handler for handling forwarded signals, or signals specified to be queued to it, and each thread calling truncate() could install a handler with that flag set to get thread specific handling. Issue History Date Modified Username Field Change ====================================================================== 2016-10-14 05:07 philip-guentherNew Issue 2016-10-14 05:07 philip-guentherName => Philip Guenther 2016-10-14 05:07 philip-guentherOrganization => OpenBSD 2016-10-14 05:07 philip-guentherSection => truncate 2016-10-14 05:07 philip-guentherPage Number => 2178 2016-10-14 05:07 philip-guentherLine Number => 69754 2016-10-14 07:48 shware_systems Note Added: 0003414 ======================================================================