User Tools

Site Tools


сигналы

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
сигналы [2016/07/14 08:23]
val [INT]
сигналы [2021/10/04 09:00]
val
Line 4: Line 4:
  
 <​code>​ <​code>​
-linux# sudo kill -L +# kill -l
- +
-freebsd# kill -l+
 </​code>​ </​code>​
 ===== Определение PID процесса ===== ===== Определение PID процесса =====
Line 15: Line 13:
  
 # cat /​var/​run/​sshd.pid # cat /​var/​run/​sshd.pid
 +</​code>​ 
 +===== Отправка сигнала ===== 
 +<​code>​
 # kill -s <​SIGNAL>​ <PID> # kill -s <​SIGNAL>​ <PID>
  
 # kill -<​SIGNAL>​ <PID> # kill -<​SIGNAL>​ <PID>
 +
 +# pkill -<​SIGNAL>​ sshd
 +
 +# apt install psmisc
  
 # killall -<​SIGNAL>​ sshd # killall -<​SIGNAL>​ sshd
Line 42: Line 46:
 # kill -HUP <PID> # kill -HUP <PID>
  
-$ nohup find / -name index.html > search.result.txt 2>/dev/null &+$ nohup /usr/​bin/​ssh ​-N -R 200X:​localhost:​22 userX@gate.isp.un 
 +<Ctrl-Z> 
 +bg
 <​Ctrl-D>​ <​Ctrl-D>​
 </​code>​ </​code>​
  
-===== INT <Ctrl-C> =====+===== TSTP <Ctrl-Z> ===== 
 + 
 +  * [[https://​ru.wikipedia.org/​wiki/​SIGTSTP]]
  
 <​code>​ <​code>​
-# kill -<PID>+# kill -TSTP <PID>
  
-kill -INT <PID>+jobs 
 + 
 +# bg ... 
 + 
 +# fg ...
 </​code>​ </​code>​
  
-===== TSTP <Ctrl-Z> =====+===== INT <Ctrl-C> ===== 
 <​code>​ <​code>​
 +# kill -2 <PID>
  
 +# kill -INT <PID>
 </​code>​ </​code>​
 +
 ===== KILL ===== ===== KILL =====
 <​code>​ <​code>​
Line 77: Line 93:
 <​code>​ <​code>​
 # kill -STOP <PID> # kill -STOP <PID>
-</​code>​ 
  
-===== TSTP (Ctrl-Z) ===== +pkill -STOP -u student bash
- +
-[[https://​ru.wikipedia.org/​wiki/​SIGTSTP]] +
-<​code>​ +
-kill -TSTP <​PID>​ +
- +
-# jobs+
 </​code>​ </​code>​
  
Line 91: Line 100:
 <​code>​ <​code>​
 # kill -CONT <PID> # kill -CONT <PID>
 +
 +# pkill -CONT -u student bash
  
 # fg %JOBID # fg %JOBID
сигналы.txt · Last modified: 2021/10/04 09:01 by val