Reload not working on WSL if script is missing shebang
Running a app through Hypercorn on WSL while editing the file on Windows causes reloading to break if there is no shebang in the file.
OSError: [Errno 8] Exec format error
This is caused by
DrvFs mounting the Windows filesystem with
777 as permissions on all files. Since most editors overwrite the file on save and
metadata mount option causes the permissions to be saved with the file I can't remove the execute permission.
I suggest updating hypercorn.utils.restart to not only check
os.X_OK but read the first two bytes of the file to check if there is a shebang present or not. If this sounds like an acceptable solution I'd be more than happy to submit a MR.