I have looked at the man page for unlink. Many times. It deals with the
filesystem, not descriptors. Have you looked at the man page for close?
That's what you want. Make sure it's being called on d->descriptor somewhere.
Also make sure there's no way a duplicate of your descriptor exists in any
process, since the client's side won't close until all copies of that
descriptor are closed.
This can happen if your MUD opens a second process and the child never exits.
It could also happen if you dup() the descriptor.
I can't imagine why you would do either of those things, but hey who knows.
You still may be able to do some debugging via the sockets command. When you
connect, it should show which descriptor number that player is on. If those
numbers are never reused and keep getting bigger every time you quit and
reconnect, you know your descriptors are being kept open for some reason.
--Palrich.
----- Original Message -----
From: "Christopher Bunting" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, March 31, 2005 5:00 PM
Subject: Re: Quit / Logout Bug
Hello,
The problem is that when I quit from the mud using the quit command,
the player quits and doesn't show up in do_sockets or do_users. But
unless I actually close the descriptor, which do quit does not, then
none of the mud clients I use show the connection as actually being
closed.
In regards to unlink(); Yes, this deletes files but if you read the
man pages and look at how it's used in remorting and other code, it
also closes/unlinks the descriptor. While I may not need strsave, that
was what I used since i just copied and pasted it from another
function but either way, the problem I has is partially solved and
using unlink in that fashion hasn't caused any problems.. I just need
a better method of closing the descriptor to the player I guess.
Thanks,
Chris
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom