On Sun, 20 Oct 1996 jmlemke@icaen.uiowa.edu wrote:
> Ok, I seem to have narrowed this down a little.. What seems to be
> happening is that whenever my mud recieves a Segmentation Fault, it closes
> without resetting the port... I got this far after toying with things a
> while and duplicating the error a few times... So now several of said ports
> are gone... I consider myself a decent coder, but sockets and stuff are a
> little over my head.. From what it looks like, I need either a) a way to
> close that socket/port when the mud gets a seg fault, or b) write some kind
> of process to run between autoruns that will attatch itself to that
> socket/port and close it if it is left open. Anyone know if either of
> these are possible, or maybe even could point me in the direction of
> trying to figure this out?
This is actually a bug with your OS. It's supposed to close all sockets
after the program that created them crashes. I could probably write a
small program like...
#include <stdio.h>
void main(void) {
int s = socket(AF_INET, SOCK_STREAM, 0);
if (s < 0) {
fprintf("Could not open the socket.\n");
exit(1);
}
close(s);
}
I'm not sure, though, whether it will open a socket that is already
opened, or if the socket was closed, but it wasn't unbound to the port,
or whatnot. In any case, have your sysadmin send a bug report to the
people whom publish the OS.
<*=-+Daniel+-=*>
"Forgive me father, for I am sin."
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST