|
|
|
|
|
by unpythonic
1965 days ago
|
|
Because ctrl-z will stop the current command, and when you run "fg" it resumes that one process. However, the loop you were in has been abandoned, and it will not continue to execute. For example, try it with this: for N in $(seq 10); do echo $N; sleep 1; echo $N; done
You'll see something like this: $ for N in $(seq 10); do echo $N; sleep 1; echo $N; done
1
1
2
^Z
[1]+ Stopped sleep 1
$ fg
sleep 1
$
|
|
Also, you may have things talking to external resources that are sensitive to timeouts ... even small ones. You may not be able to cleanly resume execution and cause an entirely new problem.