-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't really work on OSX #5
Comments
Ha, yeah, thanks for catching these. The GNU-isms are a little hard to work around, although it's possible to do some feature-testing at the beginning and create wrapper functions for things that are just slightly different. My hunch is that many of the uses of sed, etc. could be replaced with clever uses of I'll have to spend some time with the pipe buffering issues - I wonder if there's a way to force it to flush periodically, or change a file attribute to reduce the buffer size...? |
Using `/bin/bash` to invoke bash is effective, but does not allow for flexability. `/usr/bin/env bash` will load bash from the PATH. This allows for the user to set the version of bash. As for the BSD replacements, I basically detect the presence of GNU versions of the coreutils, and if they are present, create functions to use them in place of the BSD versions Helps fix issue jneen#5
The pipe buffer issue is very difficult to solve. A hint as to how to do it is the I actually talked this over with a kernel developer, and they suggested Unfortunately, most people that have pipe buffering issues only come up with solutions that work on linux. The most hackish way to solve the problem would be to always pump out huge messages, possibly by padding with a character that the browser will ignore (or just not render). |
There are a few major issues that cause it to break on OSX. I have patches for most of them but the last might be impossible...
#!/bin/bash
These are the easy ones to fix, and I will add a patch later today.
The real stinker though is the buffering that occurs within the pipes. In the primary code loop (that actually contains the
nc
call in server.sh) there are a set of pipes that buffer the data that flow through them. While I assume this is not an issue on linux, it seems that OSX will buffer quite a lot of data in these pipes. I could only get pages to flush when they were quite long. The standard 404 page would not flush until I added several K of text (I did not actually search for the magic number, just poured a bunch of text in).Intense googling only revealed solutions that worked on Linux. Unless anyone has any ideas, I am not sure if small responses will work on OSX.
The text was updated successfully, but these errors were encountered: