I ran into a “bad system call” error while trying to run Apache2 on cygwin.
I had installed Apache 1.3 and Apache 2 using cyg-apt, but when I went to start the Apache 2 server, I kept getting this error.
Of course, I set off to fix this and after googling for a while, I found out that to fix the “bad system call” error you have to set the CYGWIN environment variable to ‘server’.
The problem is, no one actually tells you one of two things
- How to do it
- That you have to have cygserver installed and running before hand.
First of all, set the CYGWIN environment variable.
Start by going to the root of your cygwin install and open cygwin.bat
Now insert this line in it
save the file and restart your cygwin shell (more information on setting the CYGWIN environment variable)
Now type cygserver-config and hit enter
For me, that was enough (as you can see from the image above), but in case you need more help installing cygserver, here’s a link
After that, you just need to start the cygserver service like so
and now the command
httpd2 -k start