I'm having difficulties with a homework assignment whose intent is to implement a client/server service that will respond whether a remote host is up or not.
For example, a user who types:
accesses the myping client which contacts the myping server on atrium99. The user would get the response:
myping: 2:24pm up 110 day(s), 23:17, 13 users, load average: 0.51, 0.42, 0.50
The myping server running on a host CPU (like atrium99) listens at its well-known port for client requests. The server forks a child to respond to the request. The original server process continues listening at the socket. (Assume that the myping well-known port number is defined by the constant MYPINGPORT.)
When I submit my code to ToTeach (a LAN-based automatic program homework checking system), I get a very ambiguous error:
Your code had a nonzero status exit or it hung or see below
The client program had a non-zero exit status
However, I continue to get this message even when I change all of my exit() statements to return 0 values.
Can someone please take a look at ( my code ) and tell me what I'm doing wrong?
Thanks so much!