GiselleSerate / myaliases

Useful shell aliases and functions.
6 stars 1 forks source link

cds - too many file descriptors? #66

Closed aryarm closed 5 years ago

aryarm commented 6 years ago

I ran into this error using cds:

-bash: redirection error: cannot duplicate fd: Too many open files
-bash: /dev/null: Too many open files

Is the problem reproducible? Try keeping terminal open for a couple days and using cds a lot. Maybe WSL isn't properly removing file descriptors?

In any case, the problem went away as soon as I closed the terminal and reopened it. It seems kinda obscure. I haven't run into it a second time.

aryarm commented 6 years ago

a quick look into how I should be closing file descriptors led me to this page, which explains that both <&- and >&- syntax work to close file descriptors, so I don't think I'm doing anything wrong in that arena

aryarm commented 6 years ago

If it isn't cds's fault, it could be happening because other scripts are creating file descriptors and forgetting to close them (or perhaps only one script that's being run multiple times).

aryarm commented 5 years ago

it's been more than a year and I've never run into this problem a second time

even if it is a problem with cds, I have no way of reproducing it, so I'll close this for now