S
S
Splite2014-03-10 16:13:13
linux
Splite, 2014-03-10 16:13:13

How to release a port after an emergency termination of a program?

Hello! There is a program that listens on a certain port, but sometimes it is urgently terminated, after which it cannot be started again (the port is busy). How can I free the port?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-03-10
@Splite

set the SO_REUSEADDR option when creating the socket.

S
Sergey, 2014-03-10
@edinorog

End urgently? If the process is killed, then the port will not listen. Understand which component of the program works with this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question