|
커피향이 나는 *NIX
커피닉스
시스템/네트웍/보안을 다루는 곳
|
|
|
|
| 이전 주제 보기 :: 다음 주제 보기 |
| 글쓴이 |
메시지 |
나그네.. ㅠ,ㅠ 손님
|
올려짐: 2004.9.13 월, 10:15 pm 주제: [질문] /var/lock/subsys/ 에 있는 파일 ? |
|
|
/var/lock/subsys/ 이디렉토리의 용도가 궁금합니다.
데몬들 스크립트 보면 데몬 시작시 이디렉토리에 데몬이름으로 크기가 0인 파일을 생성하고,
죽일때는 없애도록 되어 있던데요..
rc.local 파일에도 touch /var/lock/subsys/local 이렇게 되어 있는데요..
저파일 없어도 데몬들 잘뜨던데요... 왜그런지 아시는분은 알려주셨으면 합니다.
좋은 하루 보내시구.. 읽으시느라 수고하셨습니다..
그럼 수고하세요... |
|
| 위로 |
|
 |
yasu 카페 관리자
가입: 2004년 2월 10일 올린 글: 73
|
올려짐: 2004.9.15 수, 11:22 pm 주제: Re: /var/lock/subsys/ 에 있는 파일 ? |
|
|
대단하시네여..그러한 의문을 가지고 계시다니..장차 구루가 되실거 같습니다.
저도 님의 말을 듣고 보니 의문이 생기네여..
# rpm -qf /var/lock/subsys
filesystem-2.1.6-2
패키지는 filesystem 패키지의 일부인걸로 보이는데, 그 구체적인건 아무래도 커널과 관련되어있지 않을까 싶습니다 .-.-
상세한 내용을 아시게되면 저도 알려주세요~ ^^ |
|
| 위로 |
|
 |
공포탄 손님
|
올려짐: 2004.11.16 화, 9:10 am 주제: 저도 yum 을 사용하다가 subsys 의 파일들이 궁금해서~ |
|
|
구글에게 도움요청을 해보았는데요 아래와 같은 검색되엇네요
아래는 원문이구요 제 짧은 영어 실력으로 핵심만 해석해 보면
init 에서 프로세서 생성시에 subsys files들을 생성하고
init 이 shutdown 시에 subsys files 항목들에 대해서 프로세스 종료를 수행한다는 것 같습니다 ㅡ.ㅡ;
사용자가 수동으로 프로세서를 실행하면 pid 값만 새성되니까요
init은 시스템 종료시에 사용자가 실행한것은 자동으로 종료 시키지 않겟죠~
init이 수행한것은 init이 알아서 끌수 있게끔 해주는 역활을 하는 것 같습니다.
맞는지 모르겟네요~ㅡ.ㅡ;
===============================================
I believe that the difference is determining whether the program was
started by the init script or not. After all, the pid file is under
control of the program itself, and is not cleaned. Using the RH service
program to run the init script is a controlled startup/shutdown which is
reflected by the subsys files. Manually starting the process is
uncontrolled, but will result in a pid file if the program creates it.
Therefore,
if subsys lock file exists
process was at some point started by init script else
process may have been started manually, check for pid file if pid
file exists, check for existance of process
None of which is entirely watertight, as neither the existance of a
subsys lock file nor a pid file is a guarantee that the process is
actually running.
The subsys lock file should, when shutting down the machine, cause the
init script to try to stop the process, on the basis that it started it
in the first place, however a cursory look suggests that largely no such
checks are made, except in the killall script which is the sweeper at
the end of the shutdown process. |
|
| 위로 |
|
 |
|
|
새로운 주제를 올릴 수 없습니다 답글을 올릴 수 없습니다 주제를 수정할 수 있습니다 올린 글을 삭제할 수 없습니다 투표를 할 수 없습니다
|
Powered by phpBB © 2001, 2005 phpBB Group
|