tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: linux has added "close on exec" flags to lots of fd calls

Seems easier just to do open with the additional flag.

Not if you want to write portable software.

This is how you write portable code.

#ifndef F_CLOEXEC
#define F_CLOEXEC 0


fd = open(... F_CLOEXEC);
if (fd < 0) fail();

You are proposing changing 10-15 years old c library api/abi that supports threads today. Even better, thease are suport libaries that are used by other support libraries 4-5 layers deep, and you want to change their interface. Very few of them are under my control.

As I see it, NetBSD can choose to be supporting safe function usage, I think netbsd should, since I'll use the feature if its there.


Home | Main Index | Thread Index | Old Index