in reply to Re^2: failing to use getdents system call on Linux
in thread failing to use getdents system call on Linux
Your C code uses a much larger buffer. Maybe that circumvents some edge case that your Perl logic doesn't handle.
Also, the buffer handling is different between your C and Perl programs. With Perl, you cut from the front of your buffer while with C, you walk a pointer over it. I would rewrite the Perl program to use substr maybe to mimic the C code closer.
Also, is there a reason why you're avoiding readdir?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: failing to use getdents system call on Linux
by glasswalk3r (Friar) on Nov 04, 2016 at 00:26 UTC |