Re: close-exec flag not working in 2.6.9?

From: Ben Greear
Date: Mon Jan 31 2005 - 16:27:14 EST


Ulrich Drepper wrote:
On Sun, 30 Jan 2005 23:56:07 -0800, Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote:

flags = fcntl(s, F_GETFL);
flags |= (FD_CLOEXEC);
if (fcntl(s, F_SETFL, flags) < 0) {


These have to be F_GETFD and F_SETFD respectively. Note L -> D.

Yes, that does seem to work much better. It would have been
a while before I ever figured that out on my own.

Thanks to you and the other people who pointed that out
off the list!

Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/