jezdez / envdir

A Python port of daemontools' envdir.
https://envdir.readthedocs.io/
MIT License
229 stars 28 forks source link

Nondescript error when having non-envdir style files in the env directory #39

Open ptrf opened 9 years ago

ptrf commented 9 years ago

I was standing in my envdir when my psql session decided to do a coredump, creating a .core file in the envdir. This later resulted in the rather nondescript error An error occurred: [Errno 7] Argument list too long, as I had failed to remove the .core-file.

I could look into this and submit a patch if you think it makes sense / is possible to handle this type of error in a sensible way?

ticosax commented 9 years ago

Maybe we can raise a better error that output the faulty filename in order to spot the file more easily. @ptrf please can you provide a traceback ?

blueyed commented 9 years ago

There appears to be no traceback.

Using a 100mb full of NUL I get this error:

envdir envdir/ ls
Unable to run command ls: [Errno 7] Argument list too long

There should be a limit about how much is being read from a file probably.