advanced bash-ing for long compiles
Lawrence Velázquez
larryv at macports.org
Fri Oct 14 08:09:54 PDT 2016
> On Oct 14, 2016, at 10:30 AM, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
>
> long compiles can take hours
>
> i can ssh into the machine and get it started
>
> sudo port -v install gcc48 gcc5 gcc6 gcc7
>
> that, for example, might take several days to finish (if it does
> finish)
>
> then I control-Z to pause it, and "bg" to throw it into the background
>
> then I can close my ssh session and the compile proceeds...
>
> how exactly do I best find that process to "fg" it again? If I just
> log back in and "fg" it, it is not found. but top shows the process is
> humming away in the background, as expected
You can't bring that process back into the foreground because it is no
longer under any shell's job control because you terminated its
controlling shell by exiting the ssh session.
http://mywiki.wooledge.org/BashGuide/JobControl
> is the process different from a local shell vs a remote shell?
There's no real distinction between a "local" shell and a "remote"
shell.
> is this all wrong, and it's way better to use screen or tmux or ???
Yes. Save yourself the headache.
vq
More information about the macports-dev
mailing list