Hi,

I want to list all processes by scanning /proc/. The following code doesn't work

[code]
foreach (string fstatm; dirEntries("/proc/", "[0-9]*", SpanMode.shallow)) {
    writefln("pid %s", fstatm);
  }
[/code]

as it only list a few entries before exiting

[code]
pid /proc/9
pid /proc/935
pid /proc/9146
pid /proc/9149
pid /proc/9150
pid /proc/9151
pid /proc/9756
pid /proc/9759
pid /proc/9760
pid /proc/9761
[/code]

I don't want to use `SpanMode.depth` or `SpanMode.breadth` because it will scan so deeply and there would be a permission problem.

Any ideas?

Thanks a lot

Reply via email to