Bug 253422 - unnecessary "signal SIGPIPE" sending in dofilewrite.
Summary: unnecessary "signal SIGPIPE" sending in dofilewrite.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL: https://reviews.freebsd.org/D28562
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 23:33 UTC by Horse Ma
Modified: 2021-02-10 23:34 UTC (History)
1 user (show)

See Also:


Attachments
diff for this bug. (1.42 KB, patch)
2021-02-10 23:33 UTC, Horse Ma
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Horse Ma 2021-02-10 23:33:50 UTC
Created attachment 222347 [details]
diff for this bug.

current code in dofilewrite will send SIGPIPE once there is error of EPIPE, While SIGPIPE is just needed on socket and pipe operation. this is defined in POSIX standard, also with change it can be compatible with more Linux application.
Here is one example:
    in function nfslock_write, it call nfslockdans, and it's possible that nfslockdans encounter EPIPE error.
    application's expectation is jut got write error with return error EPIPE, while freeBSD kernel send extra signal SIGPIPE, this will cause application killed by unexpected signal.
  

https://reviews.freebsd.org/D28562