[Daily Post]는 매일매일 탐구한 내용을 간략하게 기록하는 포스트입니다.
따라서 정리되지 않은 내용과 추측을 포함하고 있을 수 있습니다.
더 체계적인 형식을 갖춘 글은 해당 카테고리의 포스트를 확인해주세요 :)

Daily Study

Github Blog 페이지 관리

Screen Shot 2022-11-08 at 6 57 10 AM

포스트 내의 category 버튼을 누르면 다음과 같은 페이지로 이동한다. 로컬에서 확인한 경로는 다음과 같다

http://127.0.0.1:4000/categories/#daily
  • #Daily가 어디에 지정되어 있는지를 찾아야 한다.
  • #Daily는 아니고 #+category_name으로 concatenate하는 파일이 있을 것 같다.
  • [root]-[_includes]-post__taxonomy.html을 열어 해당 파일의 내용 전체를 주석처리 했다.
    • 최선의 방법은 아니다.

Process

  • An instance of a program in execution
  • Hierarchy: one process can create another process
  • Creating a new process
    • pid_t fork(void): create a new process
    • return 0 to the child process
    • return child’s pid to parent process
    • ** being called once, return twice **
  • Destroying a process
    • void exit(int status): exit a process
  • Synchronizing with children
    • pid_t wait(int *status): suspend the process, until one of its children terminates
      • return value is child’s pid
    • pid_t waitpid(pid_t pid, int status, int options)*: wait for specific process
  • Zombie process: terminated, not removed
    • reaping by killing parent

Running New Programs

  • int execl(char *path, char *arg0, …, NULL)
    • Load and run executable at path with arguments arg0, arg1, … .
    • return -1 if error
  • int execv(char *path, char *argv[])
    • argv: null terminated pointer arrays

Pipe and Redirection

  • Everything is file descriptor!
  • I/O redirection : by calling the dup2(oldfd, newfd) fn.
    • make newfd to refer oldfd’s file descriptor (copy)
    • dup2’s role: change stdout’s direction

오늘의 시행착오

make clean

- make --> execute --> make clean 할 필요 없이, execute 후 make만 다시 해줘도 기존의 file들은 삭제되고 새로운 file로 make 된다!