lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Cancel a goto request


From: Thorsten Glaser
Subject: Re: [Lynx-dev] Cancel a goto request
Date: Tue, 8 Oct 2019 21:36:35 +0000 (UTC)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]