mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Force socket write operation to ignore any signals
This commit is contained in:
parent
6ebd50ab85
commit
f71ffeabb7
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ void socket_write(char input_char)
|
||||||
{
|
{
|
||||||
if (clientfds[i] != -1)
|
if (clientfds[i] != -1)
|
||||||
{
|
{
|
||||||
if (write(clientfds[i], &input_char, 1) <= 0)
|
if (send(clientfds[i], &input_char, 1, MSG_NOSIGNAL) <= 0)
|
||||||
{
|
{
|
||||||
tio_error_printf_silent("Failed to write to socket (%s)", strerror(errno));
|
tio_error_printf_silent("Failed to write to socket (%s)", strerror(errno));
|
||||||
close(clientfds[i]);
|
close(clientfds[i]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue