Resolve scgi software crash

This commit resolves a scgi software crash when the scgi socket is closed before the message can be sent. It instructs `::send()` not to send a SIGPIPE termination signal. Instead the value -1 is returned and handled bellow. The SCgiTask is closed and a new one is sent to complete the task.

```
Thread 3 "rtorrent scgi" received signal SIGPIPE, Broken pipe.
                                                             [Switching to Thread 0x7fffe635c6c0 (LWP 2443872)]
0x00007ffff7929a84 in send () from /lib/x86_64-linux-gnu/libc.so.6
```
This commit is contained in:
stickz
2024-10-25 12:35:43 -04:00
committed by Jari Sundell
parent 6e976616a0
commit b284be6a66
+1 -1
View File
@@ -200,7 +200,7 @@ SCgiTask::event_read() {
void
SCgiTask::event_write() {
int bytes = ::send(m_fileDesc, m_position, m_bufferSize, 0);
int bytes = ::send(m_fileDesc, m_position, m_bufferSize, MSG_NOSIGNAL);
if (bytes == -1) {
if (!rak::error_number::current().is_blocked_momentary())