Skip to content

Use Eventfd() from golang.org/x/sys/unix#1491

Merged
mrunalp merged 2 commits intoopencontainers:masterfrom
tklauser:unix-eventfd
Jun 23, 2017
Merged

Use Eventfd() from golang.org/x/sys/unix#1491
mrunalp merged 2 commits intoopencontainers:masterfrom
tklauser:unix-eventfd

Conversation

@tklauser
Copy link
Contributor

Update golang.org/x/sys/unix to get Eventfd() and the corresponding EFD_* flags introduced in golang/sys@0b25a408) and switch libcontainer to use Eventfd() instead of manually reimplementing it. Also use the correct corresponding unix.EFD_CLOEXEC flag instead of unix.FD_CLOEXEC (which can have a different value on some architectures and thus might lead to unexpected behavior).

tklauser added 2 commits June 21, 2017 09:49
Update golang.org/x/sys to get the Eventfd syscall wrapper and the
corresponding EFD_* flags. These will be used in a successive commit to
simplify code in libcontainer/notify_linux.go.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Use unix.Eventfd() instead of calling manually reimplementing it using
the raw syscall. Also use the correct corresponding unix.EFD_CLOEXEC
flag instead of unix.FD_CLOEXEC (which can have a different value on
some architectures and thus might lead to unexpected behavior).

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@crosbymichael
Copy link
Member

crosbymichael commented Jun 21, 2017

LGTM

Approved with PullApprove

@crosbymichael
Copy link
Member

@tklauser Thanks for working on these. It really helps.

@mrunalp
Copy link
Contributor

mrunalp commented Jun 23, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 8e1896b into opencontainers:master Jun 23, 2017
@cyphar
Copy link
Member

cyphar commented Jun 24, 2017

I second @crosbymichael -- thanks a lot for these @tklauser!

@tklauser tklauser deleted the unix-eventfd branch June 26, 2017 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants