sin fd shows [@0]

I have a task, imageftp, that periodically connects to a server, sends a
bunch of data, and then disconnects, using the FTP protocol. It uses alarm()
to abort socket functions that hang; in particular, I just added an alarm()
to the accept() that is done by the client, waiting for the server to come
back and make the data connection for the transfer, because sometimes the
server doesn’t come back.

This is all working ok, but when I do “sin -P imageftp fd”, I see two of the
file descriptors as “[@0]”. I have no idea what this means. Further,
imageftp started out with none of these, then there was one, now there are
two. It appears I have some sort of resource leak, but I can’t tell what the
resource is.

Any help would be appreciated.

Thanks,

Kevin

Any comments? Anyone? I now have four of these [@0] fds.

“Kevin Miller” <kevin.miller@transcore.com> wrote in message
news:dju2cl$1fp$1@inn.qnx.com

I have a task, imageftp, that periodically connects to a server, sends a
bunch of data, and then disconnects, using the FTP protocol. It uses
alarm() to abort socket functions that hang; in particular, I just added an
alarm() to the accept() that is done by the client, waiting for the server
to come back and make the data connection for the transfer, because
sometimes the server doesn’t come back.

This is all working ok, but when I do “sin -P imageftp fd”, I see two of
the file descriptors as “[@0]”. I have no idea what this means. Further,
imageftp started out with none of these, then there was one, now there are
two. It appears I have some sort of resource leak, but I can’t tell what
the resource is.

Any help would be appreciated.

Thanks,

Kevin

Kevin Miller wrote:

Any comments? Anyone? I now have four of these [@0] fds.

I believe it’s a output issue with sin, but IIRC, [] is used for
connections to terminal devices without a name (ie. [con]) and @ is
something stuck in the name for sockets. I’ll assume the 0 is the NULL
end. So if I had to guess, you’re leaking some type of socket resource.


Cheers,
Adam

QNX Software Systems
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster

Kevin Miller wrote:

Any comments? Anyone? I now have four of these [@0] fds.

From brief look at sin source, this means a socket on Node 0 (local).