It is always better to trap signals and close the socket. Otherwise, the opened socket would be left unclosed and if your system reaches the max number of open descriptors limit, u wud be able to...