CyberPsychotic wrote:
> > 2. lsof, list open files with a lot of details (much more than whats
> > available in /proc on Linux)
>
> can you clarify what lsof is? I didn't find it on my machine (full
> installation of R.H. 4.2)
NAME
lsof - list open files
DISTRIBUTION
The latest
sorry for long delay...
> > By the way, is there way in gdb to check what filedescriptors are opened
> > in some process, so I could investigate such behaviour in future?
>
> Not that I know of but there are a couple of other tools that may help
> you:
>
> 1. strace/truss, list every systemcall
CyberPsychotic wrote:
> By the way, is there way in gdb to check what filedescriptors are opened
> in some process, so I could investigate such behaviour in future?
Not that I know of but there are a couple of other tools that may help
you:
1. strace/truss, list every systemcall made by the prog
CyberPsychotic wrote:
> yep. Checked this. On BSD machines sock_a gets some random value, while on
> Linux it's always zero. This was the cause why it was stuck in accept. By
> the way, is there way in gdb to check what filedescriptors are opened in
> some process, so I could investigate such be
> > hmm. But I don't have any other descriptors opened. (which may've been
> > randomly closed). And following the man page, if I don't have any opened
> > f-descriptors, close would return -1 and EBADF.
>
> You do; you have the listening socket (sock_s) open. If you closed all
> descriptors prio
CyberPsychotic wrote:
> > > while(1)
> > > {
> > > close(sock_a);
> >
> > The first time that you get here, sock_a will have a random value, so
> > you don't want to close it here. You should close it in the parent
> > process after the fork().
>
> hmm. But I don't have any other descriptors
> > 2.2.5) and things worked just fine. I brought it to some linux(redhat 4.1
> > kernel 2.0.29,libc 5.3.*) and weird things happen:
>
> libc 5.3.* is a development version. You should install one of the
> recent 5.4.* versions to eliminate that as a possible source of error.
yep. But libc 5.3.1
CyberPsychotic wrote:
> Here I was writing some code(just for testing purposes) which is supposed
> to sit and listen to some certain port on machine, and when gets
> connection, just pass some text file there. (in attached file, apache's
> access_log file). Originally I was writing this on BSD
Hello people,
Here I was writing some code(just for testing purposes) which is supposed
to sit and listen to some certain port on machine, and when gets
connection, just pass some text file there. (in attached file, apache's
access_log file). Originally I was writing this on BSD machine(FreeBSD
2