圖片來源:https://jan.newmarch.name/ProgrammingUnix/ipc/lecture.html 目錄 一.背景知識 二.實作步驟 三.參考文獻 一.背景知識 1.Linux Linux是一種自由和開放原始碼的類UNIX作業系統。術語Linux只表示作業系統核心本身,但通常採用Linux核心來表達該意思。Linux則常用來指基於Linux核心的完整作業系統,包括GUI元件和許多其他實用工具。由於這些支援使用者空間的系統工具和庫主要由理察·斯托曼於1983年發起的GNU計劃提供,自由軟體基金會提議將該組合系統命名為GNU/Linux[7][8],但Linux不屬於GNU計劃。 2.fork() In computing , particularly in the context of the Unix operating system and its workalikes , fork is an operation whereby a process creates a copy of itself. It is usually a system call , implemented in the kernel . Fork is the primary (and historically, only) method of process creation on Unix-like operating systems. 3.pipe pipe() creates a pipe, a unidirectional data channel that can be used for interprocess ommunication. The array pipefd is used to return two file descriptors referring to the ends of the pipe. pipefd[0] refers to the read e...