1 |
Zac Medico wrote: |
2 |
> Raymond Lillard wrote: |
3 |
>> Mark Shields wrote: |
4 |
>>> Perhaps I wasn't clear enough (I apologize, I was only waking up |
5 |
>>> then). I changed my make.conf file yesterday and starting recompiling |
6 |
>>> my entire system with emerge -ve world &. I used the & because I was |
7 |
>>> at work and didn't want the recompile process stopping if my ssh |
8 |
>>> session was terminated unexpectedly. It's still compiling today as I |
9 |
>>> see pktstat is running, but I want to be able to see the output. Is |
10 |
>>> there a way to recapture the output to screen or to a file? |
11 |
>> |
12 |
>> Not that I know of now. |
13 |
>> |
14 |
>> If asked in advance of starting the "emerge", I would have |
15 |
>> advised you to use "nohup". |
16 |
> |
17 |
> I'm not aware of a way to reconnect with stderr, stdin, and stdout but I |
18 |
> know that those file descriptors still exist in /proc/${PID}/fd. |
19 |
> |
20 |
> Normally, in order to accomplish what you want, I would use |
21 |
> app-misc/screen. Screen is a very nice solution because you can |
22 |
> reattach to an interactive terminal whenever you want. |
23 |
|
24 |
Good idea. |
25 |
|
26 |
> Alternatively, you can redirect the emerge output to a log file: |
27 |
> |
28 |
> emerge foo > /var/log/emerge-foo.log 2>&1 & |
29 |
|
30 |
All true, but the point of using "nohup" is that it disassociates |
31 |
the nohup'd process from the parent shell/terminal session. This |
32 |
allows one to start a long running task and log out without ending |
33 |
it. Pushing a task into the background followed by a logout will |
34 |
end said background task. |
35 |
|
36 |
Progress may be monitored by logging in at some later point in |
37 |
time and/or from some other location. "tail -f" works well for |
38 |
this. |
39 |
|
40 |
-- |
41 |
Regards, |
42 |
Ray |
43 |
-- |
44 |
gentoo-user@g.o mailing list |