Raspberry Pi_Kor_19.1.2 process 죽이기

19.1.2 process 죽이기

현재 실행되고 있는 process의 처리가 더 이상 필요 없거나, process의 진행상태에 문제가 있는 경우 해당 process를 지정하여 처리를 중단할 수 있다.

19.1.2.1 “kill” 명령 – PID를 이용한 process 종료

시스템에 실행되고 있는 process를 종료하도록 시스템에 지시하는 것이 “kill” 명령이다.

Raspberry Pi_Kor_10.7.3 프로그램 background/foreground 실행

10.7.3 프로그램 background/foreground 실행

통상 우리가 명령을 실행할 때는 하나의 명령이 완료되면 다음 명령을 실행하는 방식으로 작업을 진행해 간다. 이렇게 진행하는 방식을 우리는 foreground방식이라고 한다. 이 방식에서는 하나의 작업을 진행하는 도중에는 다른 명령을 입력할 수가 없다. Pi 시스템에서는 특별한 지시를 하지 않으면, 항상 foreground 방식으로 명령을 실행하게 된다.

시스템에서 실행하는 작업 중에는 짧은 시간에 종료되는 것도 있지만, 작업시간이 꽤 오래 걸리는 작업이 있을 수도 있다. 이렇게 오래 걸리는 작업이 있는 경우, 그 작업이 완료된 이후에 다른 작업을 시작할 수도 있지만, 다음에 하고자 하는 작업이 현재 진행중인 작업과 연관관계가 없는 경우, 현재 작업이 완료되는 것을 기다리지 않고, 곧바로 작업을 시작할 수도 있다.

Raspberry Pi_Eng_10.7.3 Executing Program on Background/Foreground

10.7.3 Executing Program on Background/Foreground

Normally when we execute a command, after one command is completed, the next command is executed. We call this method of processing the foreground mode. In this way, another command can not be entered while you are working on one operation. The Raspberry Pi system always executes the command in foreground mode unless any special instruction is not issued.

Some of the tasks that you perform on the system may end in a short time, but there may be work that takes quite a while. If you have a job that takes a long time, you can start another job after it finishes, but if the next job to process is not related to the current processing job, it is possible to start the next job immediately without waiting for the current processing job to finish.

Raspberry Pi_Eng_19.1.2 Killing Process

19.1.2 Killing Process

If the current process is no longer needed, or if there is a problem with the progress of the process, you can terminate the processing of a specified particular process.

19.1.2.1 “kill” Command – Terminate Process Using PID

“kill” command tells the system to terminate the process running on the system.