SaveText.Ru

Без имени
  1. ЛЕВЫЙ:
  2. [[email protected] ~]$ ( while true; do printf "AAA %d " $$ >> ~/test.out; sleep 1; done )
  3.  
  4. ПРАВЫЙ:
  5. [[email protected] ~]$ tail -f ~/test.out
  6. AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA
  7.  
  8. ЛЕВЫЙ:
  9. [1]+  Stopped                 ( while true; do
  10.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  11. done )
  12.  PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
  13.  4380  4388  4388  4388 pts/0     4913 Ss    1000   0:00 bash
  14.  4380  4451  4451  4451 pts/1     4520 Ss    1000   0:00 bash
  15.  4388  4491  4491  4388 pts/0     4913 T     1000   0:00 bash
  16.  4451  4520  4520  4451 pts/1     4520 S+    1000   0:00 tail -f /home/cheraten/
  17.  4491  4799  4491  4388 pts/0     4913 T     1000   0:00 sleep 1
  18.  4388  4913  4913  4388 pts/0     4913 R+    1000   0:00 ps j
  19. [1]+ ( while true; do
  20.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  21. done ) &
  22. [1]+  Running                 ( while true; do
  23.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  24. done ) &
  25.  PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
  26.  4380  4388  4388  4388 pts/0     4965 Ss    1000   0:00 bash
  27.  4380  4451  4451  4451 pts/1     4520 Ss    1000   0:00 bash
  28.  4388  4491  4491  4388 pts/0     4965 S     1000   0:00 bash
  29.  4451  4520  4520  4451 pts/1     4520 S+    1000   0:00 tail -f /home/cheraten/
  30.  4491  4964  4491  4388 pts/0     4965 S     1000   0:00 sleep 1
  31.  4388  4965  4965  4388 pts/0     4965 R+    1000   0:00 ps j
  32.  
  33.  
  34. [[email protected] ~]$ ( while true; do printf "UUU %d " $$ >> ~/test.out; sleep 1; done )
  35.  
  36. ПРАВЫЙ:
  37. 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU
  38.  
  39. ЛЕВЫЙ:
  40. ^Z
  41. [2]+  Stopped                 ( while true; do
  42.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  43. done )
  44. [1]-  Running                 ( while true; do
  45.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  46. done ) &
  47. [2]+  Stopped                 ( while true; do
  48.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  49. done )
  50. [[email protected] ~]$ fg %1
  51. ( while true; do
  52.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  53. done )
  54. ^C
  55. [[email protected] ~]$ fg %2
  56. ( while true; do
  57.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  58. done )
  59. ^C
  60.  
  61.  
  62.  
  63.  
  64. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  65.  
  66.  
  67.  
  68.  
  69. ЛЕВЫЙ:
  70. [[email protected] ~]$ ( while true; do printf "AAA %d " $$ >> ~/test.out; sleep 1; done ) &
  71. [1] 6398
  72. [[email protected] ~]$ ( while true; do printf "UUU %d " $$ >> ~/test.out; sleep 1; done ) &
  73. [2] 6422
  74. [1]-  Running                 ( while true; do
  75.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  76. done ) &
  77. [2]+  Running                 ( while true; do
  78.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  79. done ) &
  80.  PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
  81.  6255  6263  6263  6263 pts/0     6263 Ss+   1000   0:00 bash
  82.  6255  6312  6312  6312 pts/1     6477 Ss    1000   0:00 bash
  83.  6312  6398  6398  6312 pts/1     6477 S     1000   0:00 bash
  84.  6312  6422  6422  6312 pts/1     6477 S     1000   0:00 bash
  85.  6422  6475  6422  6312 pts/1     6477 S     1000   0:00 sleep 1
  86.  6398  6476  6398  6312 pts/1     6477 S     1000   0:00 sleep 1
  87.  6312  6477  6477  6312 pts/1     6477 R+    1000   0:00 ps j
  88.  
  89. ПРАВЫЙ:
  90. [[email protected] ~]$ tail -f ~/test.out
  91. AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388 UUU 4388 AAA 4388
  92.  
  93. ЛЕВЫЙ:
  94. [[email protected] ~]$ kill -SIGSTOP %1
  95.  
  96. [1]+  Stopped                 ( while true; do
  97.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  98. done )
  99. [1]+  Stopped                 ( while true; do
  100.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  101. done )
  102. [2]-  Running                 ( while true; do
  103.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  104. done ) &
  105.  
  106. ПРАВЫЙ:
  107. UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312 UUU 6312
  108.  
  109. ЛЕВЫЙ:
  110. [[email protected] ~]$ kill -SIGSTOP %2
  111.  
  112. [2]+  Stopped                 ( while true; do
  113.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  114. done )
  115. [1]-  Stopped                 ( while true; do
  116.     printf "AAA %d " $$ >> ~/test.out; sleep 1;
  117. done )
  118. [2]+  Stopped                 ( while true; do
  119.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  120. done )
  121.  
  122. ПРАВЫЙ:
  123. остановлен
  124.  
  125. ЛЕВЫЙ:
  126. ( while true; do
  127.     printf "UUU %d " $$ >> ~/test.out; sleep 1;
  128. done )
  129. ^C

Share with your friends:

Print