`port edit` and ^Z in remote shells

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

`port edit` and ^Z in remote shells

René J.V. Bertin
Hi,

I've been noticing a weird and rather annoying anomaly I thought I'd share here to see if anyone has an idea why it happens. NB: I don't think it's a bug in MacPorts.

I often work remotely on my Mac, sometimes ssh'in in from my Linux rig, more often launching a terminal emulator from my Mac login session, with $DISPLAY set appropriately, so that my remote shell share the environment variables and really behaves like if I were working locally or over VNC. That's usually xfce4-terminal.

I also have a habit of pushing foreground terminal applications like vi[m] to the background with ^Z if I want to do something like checking the effect of an edit to a script (or Portfile).

When I do that in such a remote terminal emulator, more often than not the application is suspended but doesn't get send to the background. Instead, I do see the expected interactive session screen, usually with the ^Z echoed but the prompt doesn't appear. I need to open another tab or ssh in to send the editor process a SIGCONT to unblock it.

I don't think I've ever seen this over a simple ssh login, nor do I think I've seen the equivalent when I open a remote terminal emulator from Linux under XQuartz. Other than that, I get this with all terminal emulators including xterm and all shells I tried.

Any ideas? I don't see how this could  be a bug in something like ncurses because then it should happen also when I run these emulators locally (and fortunately that isn't the case).

Thanks,
R.