[완료]설정 정보 변경에 따라서 해당 프로세스 설정 동기화 방법 질문!!

jms_jms의 이미지

안녕하세요?

conf 파일이 있어서 특정 Operation에 대한 설정 정보를 저장하고 있습니다.

이 conf파일을 통해서 프로세스 실행시에 Operation에 대한 규정을 합니다.

이때 설정 정보가 바뀌었을 경우 해당 conf 파일을 프로세스 내에 설정 값을 변경 시키려고 하는데.

프로세스 재 실행; 스레드를 이용한 특정 주기로 파일에 설정된 값의 비교하는 방법을 제외한

다른 좋은 방법이 없을까요? 딱히 생각이 나지 않아서 이렇게 문의드립니다.

음... 리눅스 커널에서 proc파일 sys 파일의 경우 쉽게 할 수 있다고 생각을 하는데...

일반적인 User-level에서 동작하는 경우 어떻게 접근을 해야합니까?

답답하네염...

조언 부탁드립니다.

감사합니다.

bushi의 이미지

fifo 를 사용하면 똑같이 흉내낼 수 있습니다.

jms_jms의 이미지

잘 이해가 되지 않는뎅. 자세히 설명해주실 수 있나요?

일단 답변 감사합니다.

The ***er you become, the more you are able to ***.

bushi의 이미지

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.
jms_jms의 이미지

아 넵.. 감사합니다^^

The ***er you become, the more you are able to ***.

익명 사용자의 이미지

시그널로 처리해도 좋을듯해요.

1. 설정파일변경후 프로세스에 시그널
2. 시그널을 받으면 설정파일 재로딩.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.