[완료]설정 정보 변경에 따라서 해당 프로세스 설정 동기화 방법 질문!!
글쓴이: jms_jms / 작성시간: 수, 2011/09/07 - 7:26오후
안녕하세요?
conf 파일이 있어서 특정 Operation에 대한 설정 정보를 저장하고 있습니다.
이 conf파일을 통해서 프로세스 실행시에 Operation에 대한 규정을 합니다.
이때 설정 정보가 바뀌었을 경우 해당 conf 파일을 프로세스 내에 설정 값을 변경 시키려고 하는데.
프로세스 재 실행; 스레드를 이용한 특정 주기로 파일에 설정된 값의 비교하는 방법을 제외한
다른 좋은 방법이 없을까요? 딱히 생각이 나지 않아서 이렇게 문의드립니다.
음... 리눅스 커널에서 proc파일 sys 파일의 경우 쉽게 할 수 있다고 생각을 하는데...
일반적인 User-level에서 동작하는 경우 어떻게 접근을 해야합니까?
답답하네염...
조언 부탁드립니다.
감사합니다.
Forums:


fifo 를 사용하면 똑같이 흉내낼 수 있습니다.
fifo 를 사용하면 똑같이 흉내낼 수 있습니다.
fifo를 이용해서 어떻게 해야하는건가요?
잘 이해가 되지 않는뎅. 자세히 설명해주실 수 있나요?
일단 답변 감사합니다.
The ***er you become, the more you are able to ***.
MKFIFO(3)
MKFIFO(3) Linux Programmer’s Manual MKFIFO(3) NAME mkfifo - make a FIFO special file (a named pipe) SYNOPSIS #include <sys/types.h> #include <sys/stat.h> int mkfifo(const char *pathname, mode_t mode); DESCRIPTION mkfifo() makes a FIFO special file with name pathname. mode specifies the FIFO’s permissions. It is modified by the process’s umask in the usual way: the permissions of the created file are (mode & ~umask). A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the file system by calling mkfifo(). Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file. However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(7) for non-blocking handling of FIFO special files.아 넵.. 감사합니다^^
아 넵.. 감사합니다^^
The ***er you become, the more you are able to ***.
시그널로 처리해도 좋을듯해요. 1. 설정파일변경후
시그널로 처리해도 좋을듯해요.
1. 설정파일변경후 프로세스에 시그널
2. 시그널을 받으면 설정파일 재로딩.
댓글 달기