On Sun, Jun 20, 2021 at 10:18 AM Bernhard Reutner-Fischer <rep.dot....@gmail.com> wrote: > On 19 June 2021 17:42:35 CEST, Denys Vlasenko <vda.li...@googlemail.com> > wrote: > >+ if (opts & OPT_a) { > >+ char dn[sizeof("/proc/%s/task") + 3 * sizeof(int)]; > >+ DIR *dir; > >+ struct dirent *ent; > >+ > >+ sprintf(dn, "/proc/%s/task", pid_str); > >+ dir = opendir(dn); > >+ if (!dir) { > >+ goto no_threads; > >+ } > >+ while ((ent = readdir(dir)) != NULL) { > >+ if (isdigit(ent->d_name[0])) > >+ process_pid_str(ent->d_name, opts, aff); > >+ } > >+ IF_FEATURE_CLEAN_UP(closedir(dir);) > > Is this opencoded hunk smaller than a variant with recursive_action?
I didn't try. I don't expect it to be significantly smaller. 50/50 it would be larger. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox