Gmane
Favicon
From: Ulrich Drepper <drepper <at> redhat.com>
Subject: Re: [PATCHv3 0/4] sys_indirect system call
Newsgroups: gmane.linux.kernel
Date: 2007-11-20 16:16:49 GMT (1 year, 32 weeks, 3 days, 2 hours and 12 minutes ago)

dean gaudet wrote:
> as an application writer how do i access accept(2) with FD_CLOEXEC 
> functionality?  will glibc expose an accept2() with a flags param?

Not yet decided.  There is the alternative to extend the accept()
interface to have both interfaces:

  int accept(int, struct sockaddr *, socklen_t *);
and
  int accept(int, struct sockaddr *, socklen_t *, int);

We can do this with type safety even in C nowadays.

> if so... why don't we just have an accept2() syscall?

If you read the mails of my first submission you'll find that I
explained this.  I talked to Andrew and he favored new syscalls.  But
then I talked to Linus and he favored this approach.  Probably
especially because it can be used for syslets as well.  And it is less
code and data than introducing new syscalls.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖