Skip to content

Server does not close properly on SIGINT #1

@ZarmDev

Description

@ZarmDev

void handle_sigint(int sig) {
if (server_fd != -1) {
std::cout << "Caught SIGINT, closing server socket..." << std::endl;
close(server_fd);
}
exit(0);
}
signal(SIGINT, handle_sigint);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions