[Techtalk] Rescue data in a hung vi process?

Amanda Babcock alb at quandary.org
Wed May 8 15:32:51 EST 2002


Whoops!  I didn't see Terri and Laurel's answers because, ironically,
they sent me a copy directly (and it procmailed wrong).

On Wed, May 08, 2002 at 01:18:14PM -0400, Terri Oda wrote:

> You tried typing "fg" to put vi in the foreground, right?  Usually when 
> this happens to me in a program it's because I hit ^Z (suspend) and "fg" 
> brings the process back to the foreground so I can exit it properly.

Tried it... no dice.  Also tried ^Z just now in a working mutt/vi session
(this one right here :), to see what would happen, and it just ^Z's mutt 
and puts me at a command line - when I wedged vi, it just left the cursor 
in the middle of the word I was trying to edit, and didn't give me a 
prompt.

Now, I *have* in the past ^Z'd a process that had been invoked on the
same command line as the xterm, with the -e switch.  *That's* an ugly
situation, because there's no shell in which to fg.  But I don't think 
that's what happened here (for one thing, it was run from screen, not 
from an xterm).

On Wed, May 08, 2002 at 11:17:27AM -0700, Laurel Fan wrote:

> SEGV usually works to make things dump core.  

Oh, thanks.  TRAP worked too (I hadn't seen your email).

> Make sure you don't have a limit on your coredumpsize (do you know how 
> to do that? if not, which shell?).  

Nope, I don't know how to do that.  The shell is tcsh, but vi was invoked
by mutt as "sh -c vi '/tmp/mutt-mercury-52841-208'", so it's running under
sh.

But surely I would have had to change the coredump size in the shell that
vi is running under?  It's too late for that.  Or will it actually work to
change the coredump size in tcsh, where I'll be issuing the kill command?

I do think this may be the problem, though.  My coredump has some of the
file but not all.

> /dev/mem is the memory device for the entire machine (so you need root
> to access it).  strings and grepping that could possibly help...

Ooh, cool.  Will try that.

Thanks!
Amanda



More information about the Techtalk mailing list