Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 23 Mar 2013 22:12:23 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Difficulty emulating F_DUPFD_CLOEXEC

On Sat, Mar 23, 2013 at 10:09:10PM -0400, Rich Felker wrote:
> +	if (cmd == F_DUPFD_CLOEXEC) {
> +		int ret = __syscall(SYS_fcntl, fd, F_DUPFD_CLOEXEC, arg);
> +		if (ret != -EINVAL) return __syscall_ret(ret);

It might be desirable, even if F_DUPFD_CLOEXEC succeeded, to also call
fcntl(ret, F_SETFD, FD_CLOEXEC)... Reportedly somebody broke
F_DUPFD_CLOEXEC somewhere around 3.7.0 so that it silently failed to
set the close-on-exec flag. Anybody know how many kernels are
affected?

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.