Recovering an orphaned process and some fun with gdb

Back when I was just starting with unix as a student I remember losing connection to the university’s mailserver in the middle of composing a long email. I went over to the helpdesk and asked if I could recover the process in a new login session, I got a few blank looks and not much else. It seems that it’s still not easy.

We were discussing this a few months ago and I came across this post by Andrew Tridgell (of samba fame) shows how this can be done with gdb (as well as some other gdb hacks, turns out there’s all kinds of interesting stuff if you actually read the manual. Who would have thought it!).

We also discovered reptyr, a project that does the same thing using ptrace. I’ve not actually used it but it looks interesting.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s