Re: Cancel a goto request

Thorsten Glaser <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
Dixi quod…

>dan d. dixit:
>
>>I know control g will cancel many goto and/or link requests.  But when
>>I get a "waiting for response" it does nothing and that can remain for
>>a very long time.
>
>You can hit “z” there, unless it’s in that weird state where only
>http://www.mirbsd.org/htman/i386/man8/tcpdrop.htm on the connection
>will help (search the mailing list archives for details).

Tonight I found the GNU/Linux (possibly general) equivalent,
out of necessity.

Trying tcpkill from the dsniff package didn’t help (no active packets),
cutter’s also not adequate, but this works:

1. Figure out the pid of the right lynx instance

   $ ps x | fgrep lynx
    3006 pts/9    S+     0:30 lynx

2. Figure out which fd is connected to the hung socket

your pid here
└───────────────────↓
   $ ls -ln /proc/3006/fd
   total 0
   lrwx------ 1 1000 1000 64 Oct  8 23:20 0 -> /dev/pts/9
   lrwx------ 1 1000 1000 64 Oct  8 23:20 1 -> /dev/pts/9
   lrwx------ 1 1000 1000 64 Oct  8 23:20 2 -> /dev/pts/9
   lrwx------ 1 1000 1000 64 Oct  8 23:20 3 -> socket:[3031947]

3. Use a ptrace attach to close it

fd number here                                            pid here
└─────────────────────────────────↓                  ↓───────────┘
   $ gdb --batch -ex 'print close(3)' /usr/bin/lynx 3006


HTH & HAND,
//mirabilos
-- 
This space for rent.

https://paypal.me/mirabilos to support my work.

_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.