콘텐츠로 바로가기

now0930 일지

이런저런 생각

  • 홈
  • 비공개
  • 강좌
  • 잔여 작업 조회
  • 위치

[태그:] ipc

message queue, unix network programming 75p ~ 90p

fifo는 먼저 들어온 순서로 동작하지만, message queue는 빠른 우선순위로 동작한다. signal handler를 정의하여 사용할 수도 있다. message noty는 queue가 비어있을 경우 한번 동작한다. queue가 차 있다면 signal을 무시한다. 한 번 사용하면 다시 시그널을 등록해야 한다. pi@raspberrypi:~/Project/cCode/IPC $ cat mesquereceive.c //message que header #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <sys/stat.h> #include <mqueue.h> #include <signal.h> #define…… message queue, unix network programming 75p ~ 90p 계속 읽기

발행일 2020-07-15
카테고리 생활코딩 태그 c, ipc, linux, message queue, network program

fifo 예제. unix network programming 55p

pipe는 이름을 없어 parent, child process만 통신이 가능하다. 이를 보안한게 named pipe인데, fifo라고도 한다. 책은 다른 유닉스 버전으로 작성하여, linux에 맞게 수정했다. 결론적으로 pipe와 비슷하고 더 쉽다. #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <sys/types.h> #include <fcntl.h> #include <sys/wait.h> #include <string.h> #include <sys/stat.h> #include <unistd.h> #define FIFO1 “/tmp/fifo.1” #define FIFO2 “/tmp/fifo.2” #define MAXLINE…… fifo 예제. unix network programming 55p 계속 읽기

발행일 2020-07-14
카테고리 생활코딩 태그 c, fifo, ipc, linux, network program

pipe 예제. unix network programming 47p

pipe를 이해하기 전, 일단 gdb를 사용하는 방법을 알아야 했다. pipe가 서로 다른 프로세스를 연결하는 수단이라, gdb 기본 설정으로는 pipe로 어떤 내용을 확인하기 어려웠다. 아래 코드를 디버그 하기로 했다. #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <string.h> #define MAXLINE 100 void client(int, int), server(int, int); void server(int readfd, int writefd){ char buff[MAXLINE];…… pipe 예제. unix network programming 47p 계속 읽기

발행일 2020-07-13
카테고리 생활코딩 태그 c, gdb, ipc, linux, network program
2025 5월
일 월 화 수 목 금 토
 123
45678910
11121314151617
18192021222324
25262728293031
4월    

최신 글

  • common mode, differential mode 2025-05-11
  • signal conditioner, 신호 처리기 2025-05-10
  • strain gage 2025-05-09
  • 칼만 필터 2025-05-01
  • positioner(I/P) 2025-04-26

카테고리

  • 산업계측제어기술사
  • 삶 자국
    • 책과 영화
    • 투자
  • 생활코딩
    • LEGO
    • ROS
    • tensorflow
  • 전기기사
  • 피아노 악보

메타

  • 로그인
  • 엔트리 피드
  • 댓글 피드
  • WordPress.org

페이지

  • 소개
  • 잔여 작업 조회
    • 작업 추가
    • 작업의 사진 조회
    • 작업 수정 페이지
  • 사진
    • GPS 입력된 사진
    • 사진 조회
  • 위치
    • 하기 휴가 방문지
    • 해외 출장

태그

android bash c docker driver FSM gps java kernel LEGO linux mysql network program opcua open62541 plc programmers python raspberry reinforcementLearning ros state space system program tensorflow transfer function 경제 미국 민수 삼국지 세계사 실기 에너지 역사 유전자 일본 임베디드 리눅스 전기기사 조선 중국 채윤 코딩 테스트 통계 한국사 한국어

팔로우하세요

  • Facebook
now0930 일지
WordPress로 제작.