Date: Fri, 14 Jun 2002 16:36:57 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> Cc: Garance A Drosihn <drosih@rpi.edu>, FreeBSD-arch@FreeBSD.org, msmith@FreeBSD.org Subject: Re: Adding SO_NOSIGPIPE to -STABLE/-CURRENT Message-ID: <20020614133656.GB9021@hades.hell.gr> In-Reply-To: <20020614054920.1254.qmail@exxodus.fedaykin.here> References: <20020614022304.94570.qmail@exxodus.fedaykin.here> <p05111775b92f06977bcb@[128.113.24.47]> <20020614054920.1254.qmail@exxodus.fedaykin.here>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-06-14 02:48 -0300, Mario Sergio Fujikawa Ferreira wrote: > Darwin call it SOF_NOSIGPIPE because they use it as socket > flag as opposed to a socket option such as either SO_DONTTRUNC or > SO_WANTMORE. > > Well, Linux has it as a socket option, it looks okay > as a socket option so the name begins with SO_. SO_NOSIGPIPE > because it describes well its use as it does in Darwin. > > However, that's my opinion. I am all open to suggestions. The example you mentioned above (threaded programs that want to disable the signal for some of the threads, but not all of them) can probably be implemented in userland with: void sigpipe_handler (int signo) { if (we are a thread that needs sigpipe) { do something; } } One might argue that an option like SO_NOSIGPIPE will be faster and save all the threads from checking the same thing though, and I will agree with that. If you give a name to this option though, please don't make its use depend on a 'double negative'. It would be a lot better to have this option enabled by default, and call it SO_SIGPIPE. Then you don't have to "disable a NO_FOO" option, to "enable FOO". The only option that uses a similar negative meaning right now is SO_DONTROUTE, while all the rest are of the style "set SO_FOO to enable behavior bar". - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020614133656.GB9021>