From: Tomi Manninen (wvfg@mailit.tunk.net)
Date: Sat Sep 28 2002 - 02:09:04 EEST
Hi again Ben,
> When I say 'hangs up' I mean that the user is disconnected from the ax25
> link. I should have been more specific. For some reason, the link dies.
> I was using fgets to read data. I tried using fread with length of 1024,
> 2048, and 10000. It was no different.
Ok, so it is probably not the SEQPACKET problem either. However I really
can't think of any other explanation than a problem with your program.
As I said when someone connects to your system, ax25d accept()s the
connection, then fork()s. The parent process (ax25d) closes the socket
belonging to the incoming connection thereby completely detaching itself
from it. Ax25d then continues as if it never knew about that connection.
The child process copies the incoming connecting socket to it's
stdin/out/err and then exec()s your program. After that your program has
full control over the connection. Only your program can close the
connection.
Well, there is another possibility and that is that the kernel closes the
connection for some reason. I think some misconfiguration of the kernel
ax25 support could cause that to happen.
Anyway my first guess still is that there is something wrong with your
program. Are you absolutely 100% sure that ax25d manages to start it?
Could the read fail for some other reason? Have you tried logging exactly
what fails? I recommend making your program log each and every possible
error situation somewhere, maybe the system log.
-- Tomi Manninen Internet: htj.oscjyqacu@cogentltd.net.nz OH2BNS AX.25: terhi.victor@logonet.com KP20ME04 Amprnet: rnpz@yakima.com- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to rmh@udk-berlin.de More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b30 : Sat Sep 28 2002 - 02:09:29 EEST