2013-11-23 7 views
7

私のubuntuサーバーへのputty/ssh接続を使用して私の電話のアンドロイドをコンパイルし始めましたが、手前で "screen"を開くのを忘れました。数時間運転していて、私はスリープ状態にするために私のWindowsコンピュータをオフにする必要があります。セッションを画面セッションに移動する方法があるので、中断する必要はありませんか?または、パテセッションを閉じることがビルドを妨げないでしょうか?アクティブなターミナルセッションをスクリーンセッションに移動できますか?

答えて

4

はい!私はのはreptyr https://github.com/nelhage/reptyr http://monkeypatch.me/blog/move-a-running-process-to-a-new-screen-shell.html

reptyr - A tool for "re-ptying" programs. 

reptyr is a utility for taking an existing running program and attaching it to a 
new terminal. Started a long-running process over ssh, but have to leave and don't 
want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the 
ssh session and head on home. 

USAGE 

reptyr PID 

"reptyr PID" will grab the process with id PID and attach it to your current terminal. 
After attaching, the process will take input from and write output to the new terminal, 
including ^C and ^Z. (Unfortunately, if you background it, you will still have to run "bg" 
or "fg" in the old terminal. This is likely impossible to fix in a reasonable way without 
patching your shell.) 
+0

を使用している知っている唯一の方法は、どうもありがとうございました!これは私の頭痛を将来的に救うでしょう。 –

関連する問題