Reptyr works for binaries but not for scripts #13

Closed
bidaian opened this Issue Oct 24, 2011 · 10 comments

Projects

None yet

7 participants

bidaian commented Oct 24, 2011

I'm using nelhage-reptyr-61cc5f8 on Ubuntu 10.04.3 LTS). On a terminal I created a script like this:

!/bin/bash

while true
do
sleep 5
date
done

Once I started it I open another terminal and tried to reptyr the bash process, or the parent bash process. The original one was stopped (as if ^Z had been typed) but the output was still coming out on the original terminal. Maybe that's normal behaviour for scripts but just in case I report it.

Owner
nelhage commented Oct 24, 2011

Yeah, it's a known bug that it doesn't work right on anything with
subprocesses, like most shell scripts. I think this is solvable, but
I haven't gotten around to it. It should probably at least fail more
gracefully, though.

  • Nelson

On Mon, Oct 24, 2011 at 9:52 AM, bidaian
reply@reply.github.com
wrote:

I'm using nelhage-reptyr-61cc5f8 on Ubuntu 10.04.3 LTS).  On a terminal I created a script like this:

#!/bin/bash

while true
do
       sleep 5
       date
done

Once I started it I open another terminal and tried to reptyr the bash process, or the parent bash process.  The original one was stopped (as if ^Z had been typed) but the output was still coming out on the original terminal.  Maybe that's normal behaviour for scripts but just in case I report it.

Reply to this email directly or view it on GitHub:
#13

Contributor
robryk commented Feb 27, 2012

One could probably `transplant' the whole process group, one by one. I will try to look into it.

Owner
nelhage commented Feb 27, 2012

Yeah, I think you can just walk the process tree and basically do
the same operation to each child. I haven't actually tried to do so,
however. There are definitely some things that could go wrong, but I
think it may work.

On Mon, Feb 27, 2012 at 1:59 PM, robryk
reply@reply.github.com
wrote:

One could probably `transplant' the whole process group, one by one. I will try to look into it.


Reply to this email directly or view it on GitHub:
#13 (comment)

thonixx commented Feb 13, 2013

Would be useful to have the feature for shell scripts.

remino commented Aug 28, 2013

+1

thonixx commented Aug 28, 2013

any updates?

Just stumbled over this, would be a very useful feature to have.
+1

Owner
nelhage commented Sep 3, 2013

No updates. It's not really something I have the time to actively work on at the moment, unfortunately.

Owner
nelhage commented Jan 4, 2015

The new -T option should work properly for scripts under most circumstances!

@nelhage nelhage closed this Jan 4, 2015

+1 for -T option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment