in send() will it be ok to place the flag MSG_NOSIGNAL?
I've asked a previous question
I'm running a server and a client. A SIGPIPE signal crashed my server because of a broken pipe. I read that the above flag prevents that signal from being raised. My program now works and doesn't crash. But, i wonder what will be the over implicatio开发者_StackOverflow中文版ns. What happens if i prevents SIGPIPE from being raised?
Well, you shouldn't mind: it is just a different way of handling errors.
And using MSG_NOSIGNAL seems more elegant is a better way than ignoring SIGPIPE, since you may need this feature in another place of your program.
精彩评论