Preliminaries
Set up a bare repository on stu.cs.jmu.edu based on the instructions
in the CS 361 Submission Procedures,
using the name lab4-ipc.git
.
Implementation Requirements: Pipes and Spawn
Your first task is to get used to the basic functionality of pipes
for standard I/O redirection:
- Complete the implementations of
split_string()
,
create_cksum_child()
, and get_cksum()
in
pipe.c
. Pass the INTEG_split_string
,
INTEG_cksum
, and INTEG_child
unit tests before
proceeding.
- Complete the implementation of
spawn_cksum()
in
pipe.c
so that it behaves the same as calling
get_cksum()
. Instead of using fork()
and
exec()
to run the cksum
program, create the
pipe and use posix_spawn()
.