You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing this just so there's a well formed test case on the books and something to point to as duplicates are reported. Here's hoping there's a five min fix. Exists in the wild here. It's (academically) the current fatal on the body of software in question because #546 was squashed.
Nothing to see in an strace b/c the syscalls all succeed.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int proc_fd = open("/proc", O_RDONLY|O_DIRECTORY);
struct stat task_stat;
fstatat(proc_fd, "self/task/", &task_stat, 0);
if (task_stat.st_nlink < 3) {
// should never get here -- all /proc/self/task directories
// should have at least ourselves plus . and ..
fprintf(stderr, "unexpected task_stat.st_nlink < 3\n");
}
return 0;
}
Activity
stehufntdev commentedon Oct 26, 2016
Thanks for reporting the issue and providing the sample code. Adding the bug tag.
JasonLinMS commentedon Feb 5, 2017
We'll have correct link counts for directories in /proc and /sys. Thanks!
therealkenc commentedon Feb 5, 2017
You guys are on fire this week.
JasonLinMS commentedon Feb 6, 2017
Sprinting towards Creators Update!
therealkenc commentedon Mar 6, 2017
Jason Lin (@JasonLinMS) this is fixed in 15042 -15048 as well. This one is part of what lit up out-of-the-box chrome so thanks.