any chance of reviewing this code - its not very big.
i origanlly wrote this in java - but wrote a c version becuase that one would hang - i presumed some jvm problem. now i have the same with this.
any suggestions - the hang occurs every few thousand calls - from another c program using popen.
does this suggest a problem with the socket libraries etc? its very hard to debug because of when i occurs, maybe someone can find an error in the code.
linux red hat 7.2
program function - check a remote service is funtioning by gracefully connecting and disconnecting.
compile line - gcc -D_GNU_SOURCE -Wall portprobe.c -o portprobe