Skip to content

JinhyukKo/ipc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Interprocess Communication (Low-level APIs)

1. Environment

  • POSIX : Linux 5.15.0-1079-azure
  • Mach-message-passing : MacOS

2. How to use

2.1 POSIX Shared Memory

gcc producer.c -o producer -lrt
gcc consumer.c -o consumer -lrt
  • shm_open is part of the POSIX shared memory API, which requires linking with the real-time library (librt) on Linux.
  • By default, gcc does not automatically link against librt, so you must explicitly specify -lrt.
cd /dev/shm/
  • you can check the Shared memory file named "OS"

2.2 Mach Message Passing

[[https://docs.darlinghq.org/internals/macos-specifics/mach-ports.html]]

gcc server.c -o server
gcc client.c -o client
Screenshot 2025-02-06 at 23 00 36 Screenshot 2025-02-06 at 23 00 42

About

Interprocess Communication (Low-level APIs)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages