sigqueue not implemented
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
- A brief description
When trying to make a sigqueue call to pass data to a signal the function returns -1 and perror prints Function not implemented
- Expected results
sigqueue return 0 without error
- Actual results (with terminal output if applicable)
zac@zbxps:.../part1$ gcc sigq.c
zac@zbxps:.../part1$ ./a.out
Sigqueue returns: -1
Sigqueue Error: : Function not implemented
- Your Windows build number
16170
- Steps / All commands required to reproduce the error from a brand new installation
Compile and run the following code in bash on windows:
#include <signal.h>
#include <error.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <error.h>
#include <sys/types.h>
#include <sys/wait.h>
int main() {
int pid = fork();
if (pid == 0) { //child
union sigval val;
int ret = sigqueue(getppid(), SIGKILL, val);
printf("Sigqueue returns: %i\n", ret);
perror("Sigqueue Error: ");
exit(0);
}
wait(NULL);
exit(0);
}
- Strace of the failing command
execve("./a.out", ["./a.out"], [/* 16 vars */]) = 0
brk(NULL) = 0xcd0000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252e0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57047, ...}) = 0
mmap(NULL, 57047, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdb252d2000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdb24c30000
mprotect(0x7fdb24def000, 2097152, PROT_NONE) = 0
mmap(0x7fdb24fef000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fdb24fef000
mmap(0x7fdb24ff5000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdb24ff5000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252d0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252c0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252b0000
arch_prctl(ARCH_SET_FS, 0x7fdb252c0700) = 0
mprotect(0x7fdb24fef000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ) = 0
mprotect(0x7fdb25225000, 4096, PROT_READ) = 0
munmap(0x7fdb252d2000, 57047) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fdb252c09d0) = 1808
wait4(-1, Sigqueue Error: : Function not implemented
NULL, 0, NULL) = 1808
exit_group(0) = ?
+++ exited with 0 +++
- Required packages and commands to install
- gcc
See our contributing instructions for assistance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided C program in Bash on Windows and review the sigqueue-related behavior reported by the strace output. Trace the WSL implementation and existing signal-handling tests or entry points, if present. Done means the reproduction no longer returns ENOSYS and sigqueue handles the queued signal data as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100