Skip to content

Sockets

Yuki Kimoto edited this page Oct 21, 2024 · 3 revisions

FAQ

The server created using IO::Socket::IP suddenly terminates.

That's probably because you forgot to ignore SIGPIPE.

unless (Sys::OS->is_windows) {
  Sys::Signal->signal(SIGNAL->SIGPIPE, Sys::Signal->SIG_IGN);
}

See also the following topic.

https://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly

Clone this wiki locally