1
Programming / Re: Networking: socket() returns positive `non-socket`
« Last post by Steven Levine on Today at 02:42:50 am »As Dave mentioned, we need know a bit more about your development setup and build options.
Since you are building with gcc, I'm going to assume for now that you are building with kLIBC and you are using the most recent versions of libn0.dll and libcx0.dll from the netlabs repos.
You should be using the OS/2 toolkit headers provided by the libc-devel package. They work better with gcc and kLIBC than the IBM supplied headers.
FWIW, addsockettolist and removesocketfromlist are documented and they are used by kLIBC. kLIBC needs them to implement fork().
Another FWIW, I have seen the ENOTSOCK failure mode when running git against large repositories on a busy system, but perhaps not for the same reason you are. In my case the failure is intermittent and retrying the git operation when the system is less busy typically avoids the failure.
Note that OS/2 has separate namepaces for sockets and file handles, unlike Linux. kLIBC emulates the Linux way to make porting apps simpler. This requires using kLIBC for all file and socket operations.
Since you are building with gcc, I'm going to assume for now that you are building with kLIBC and you are using the most recent versions of libn0.dll and libcx0.dll from the netlabs repos.
You should be using the OS/2 toolkit headers provided by the libc-devel package. They work better with gcc and kLIBC than the IBM supplied headers.
FWIW, addsockettolist and removesocketfromlist are documented and they are used by kLIBC. kLIBC needs them to implement fork().
Another FWIW, I have seen the ENOTSOCK failure mode when running git against large repositories on a busy system, but perhaps not for the same reason you are. In my case the failure is intermittent and retrying the git operation when the system is less busy typically avoids the failure.
Note that OS/2 has separate namepaces for sockets and file handles, unlike Linux. kLIBC emulates the Linux way to make porting apps simpler. This requires using kLIBC for all file and socket operations.