This is a discussion on sockets within the AIX Operating System forums, part of the Unix Operating Systems category; --> Does anyone know how to disconnect a particular socket connection. I can grep out netstat for the connection and ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| <mailjoeg@yahoo.com> wrote in message news:55ca0bf1.0307161130.166a466f@posting.google.c om... > Does anyone know how to disconnect a particular socket connection. I > can grep out netstat for the connection and use lsof to get a list of > pids using that connection type, but I don't want to kill all of them, > just one. I'm not exactly sure what you're looking for here or why you want to do this. One way might be to use dbx (if you have the compilers installed) and close the filedescriptor (which lsof tells you). Something like this: dbx -a `pidof gdb` Waiting to attach to process 1138932 ... Successfully attached to gdb. warning: Directory containing gdb could not be determined. Apply 'use' command to initialize source path. Type 'help' for help. reading symbolic information ... stopped in poll at 0xd0246454 0xd0246454 (poll+0x94) 80410014 lwz r2,0x14(r1) (dbx) call close(1) 1. glink.close [gdb] 2. glink.close [/usr/lib/libiconv.a] 3. glink.close [/usr/lib/libcurses.a] 4. glink.close [/usr/lib/libc.a] Select one of [1 - 4]: 1 glink.close returns successfully (dbx) cont ^C Interrupt in poll at 0xd0246454 0xd0246454 (poll+0x94) 80410014 lwz r2,0x14(r1) (dbx) detach Cheers, Shaun |