Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signalfd() not fully supported? #129

Closed
mit-mit opened this issue Apr 11, 2016 · 14 comments
Closed

signalfd() not fully supported? #129

mit-mit opened this issue Apr 11, 2016 · 14 comments

Comments

@mit-mit
Copy link

mit-mit commented Apr 11, 2016

To what extent is signalfd() supported? Are only some masks supported?

The following code snippet seems to fail with signalfd failed: Invalid argument

...
 int fd = signalfd(-1, &signal_mask, SFD_CLOEXEC);
  if (fd == -1) {
    FATAL1("signalfd failed: %s", strerror(errno));
  }
...
@sunilmut
Copy link
Member

Thanks for trying this out. 'signalfd' syscall is not yet implemented in WSL. No ETA at this time. We are looking at getting the (un)implemented syscall list documented somewhere. Stay tuned!

@mit-mit
Copy link
Author

mit-mit commented Apr 26, 2016

Is this considered a 'bug' or a 'feature' per the categories descrived in readme.md?

@mit-mit
Copy link
Author

mit-mit commented May 19, 2016

@sunilmut would appreciate a quick response on my question above.

@sunilmut
Copy link
Member

@mit-mit - Apologize for the delay. As per the readme "feature – Denotes something that is not yet implemented", this would be considered as a feature. Do help us prioritize it by providing the feedback a the User Voice Page.

@xilun
Copy link

xilun commented May 20, 2016

Well signalfd is completely implemented since Linux 2.6.27 kernel released 9 October 2008 and is used in recent util-linux 2.27 that ships in Ubuntu 16.04. So I guess you will soon want to upgrade that from feature request to a bug to fix...

@benhillis
Copy link
Member

@xilun The distinction is largely arbitrary for us. I think what @sunilmut means is that if it's broken functionality in something WSL implements, it's a bug. If it's new surface area (like inotify or signalfd) it'd be a feature.

Regardless if it's a bug or a feature it's something that needs to be fixed eventually.

@xilun
Copy link

xilun commented May 20, 2016

Ok no problem about the way you handle all that, prioritize your work and so over. Was just saying that because I just checked on https://codesearch.debian.net/ and saw that the command "script" in linux-util 2.27 uses signalfd, and I thought that I would be quite sad if I can't use that basic Unix command the day I need it...

Well, I also secretly want to use it in cbwin but if its lack break Ubuntu 16.04 compat I guess it a rather more convincing incentive to get it implemented quickly ;)

@christianparpart
Copy link

christianparpart commented Mar 16, 2017

Hey, just wanted to leave me here, as I can't run my own code (w/o modification), as I depend on signalfd(), too.

That's how I call it: fd_ = signalfd(-1, &signalMask_, SFD_NONBLOCK | SFD_CLOEXEC); and fd results in -1 with ENOSYS.

Hope to hear from you soon. 👍

@realuser
Copy link

+1 Trying to run Cap’n Proto (similar to Protocol Buffers) under WSL and it doesn't fully work because of signalfd(). See capnproto/capnproto#458

@robert4os
Copy link

+1 Cannot run Microsoft's IoT Edge.

@Julien-Marcou
Copy link

Julien-Marcou commented Nov 17, 2017

+1 Cannot start LXC containers without signalfd()

# lxc start my-container
error: Error calling 'lxd forkstart my-container /var/lib/lxd/containers /var/log/lxd/my-container/lxc.conf': err='Failed to run: /usr/bin/lxd forkstart my-container /var/lib/lxd/containers /var/log/lxd/my-container/lxc.conf: '
  lxc 20171117211111.458 ERROR lxc_start - start.c:setup_signal_fd:263 - Function not implemented - Failed to create signal file descriptor.
  lxc 20171117211111.458 ERROR lxc_start - start.c:lxc_init:460 - Failed to setup SIGCHLD fd handler.
  lxc 20171117211111.458 ERROR lxc_start - start.c:__lxc_start:1314 - Failed to initialize container "my-container".

Upvoted on User Voice 😉

@jerybe
Copy link

jerybe commented Nov 22, 2017

Hello,
I also need to use signalfd() in a large number of applications that I have developed.
It seems that the feature/bug has not been solved yet. do you have any new information about this topic ?

@Brian-Perkins
Copy link

This should be resolved as of Insiders Build 17101.

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

No branches or pull requests