tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding an option to avoid SIGPIPE for all file descriptors
On Jan 24, 5:19pm, dholland-tech%netbsd.org@localhost (David Holland) wrote:
-- Subject: Re: Adding an option to avoid SIGPIPE for all file descriptors
| On Mon, Jan 23, 2012 at 10:43:38PM -0500, Christos Zoulas wrote:
| > | On Mon, Jan 23, 2012 at 09:28:48PM -0500, Christos Zoulas wrote:
| > | > [stuff]
| > |
| > | One thing jumps out at me: if it's a file-level flag, shouldn't it be
| > | sufficient to use F_GETFL / F_SETFL to manipulate it, rather than
| > | adding new fcntls?
| >
| > I thought about that, and we can definitely do this, but providing the
| > fcntl's too gives us compatibility with the MacOSX api. I am open to
| > whatever we decide.
|
| I dunno. I'm generally opposed to multiplication of new fcntls or
| ioctls, but API compat does have some value... does anyone actually
| use that API?
|
| (and I don't suppose we can think of a clever way to stuff the compat
| fcntls into libcompat or some such place so they don't bloat out the
| core system...)
The compat fcntls, are just 8 lines of code.
#define F_GETFOO X
#define F_SETFOO Y
case GETFOO:
return (fp->f_flags & FFOO) != 0;
case SETFOO:
fp->flags |= FFOO;
break;
christos
Home |
Main Index |
Thread Index |
Old Index