Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #147348

Re: avoid "too many open files" while recursively descending directory hieararchy

From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.lang.c
Subject Re: avoid "too many open files" while recursively descending directory hieararchy
Date 2019-10-29 21:43 +0000
Organization A noiseless patient Spider
Message-ID <slrn3iigqrhckj.uu.ike@iceland.freeshell.org> (permalink)
References <qpa3hd$3um$1@oguzismail.eternal-september.org>

Show all headers | View raw


On 2019-10-29, O?uz <oguz.ismailuysal@gmail.com> wrote:
> I have something like this:
>
> void f(int dir_fd) {
>     DIR *dirp;
>     struct dirent *dp;
>     struct stat *buf;
>     int fd;
>
>     dirp = fdopendir(dir_fd);
>
>     while ((dp = readdir(dirp)) != NULL) {
>         if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name)) {

The second argument to the second strcmp call seems to be missing.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-29 19:22 +0000
  Re: avoid "too many open files" while recursively descending directory hieararchy rick.c.hodgin@gmail.com - 2019-10-29 12:37 -0700
    Re: avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-29 20:05 +0000
      Re: avoid "too many open files" while recursively descending directory hieararchy rick.c.hodgin@gmail.com - 2019-10-29 13:18 -0700
        Re: avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-29 20:29 +0000
          Re: avoid "too many open files" while recursively descending directory hieararchy David Brown <david.brown@hesbynett.no> - 2019-10-29 23:31 +0100
        Re: avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-29 20:32 +0000
          Re: avoid "too many open files" while recursively descending directory hieararchy rick.c.hodgin@gmail.com - 2019-10-29 13:56 -0700
  Re: avoid "too many open files" while recursively descending directory hieararchy scott@slp53.sl.home (Scott Lurndal) - 2019-10-29 20:37 +0000
    Re: avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-29 20:57 +0000
  Re: avoid "too many open files" while recursively descending directory hieararchy Ike Naar <ike@iceland.freeshell.org> - 2019-10-29 21:43 +0000
  Re: avoid "too many open files" while recursively descending directory hieararchy Siri Cruise <chine.bleu@yahoo.com> - 2019-10-29 16:59 -0700
  Re: avoid "too many open files" while recursively descending directory hieararchy Kaz Kylheku <493-878-3164@kylheku.com> - 2019-10-30 00:20 +0000
    Re: avoid "too many open files" while recursively descending directory hieararchy Oğuz <oguz.ismailuysal@gmail.com> - 2019-10-30 01:14 +0000

csiph-web