Save this video free

ECE344 Fall 2026 (Sec 1) Lec 7 - Advanced IPC

Jon Eyolfson · 49:35 · Watch on YouTube

Part of University of Toronto ECE 344. See all 26 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Jon Eyolfson explains how Unix pipes, file descriptors, fork, dup2, and exec combine to support interprocess communication and shell-style redirection. He emphasizes that closing unused pipe ends is essential for EOF and termination, then shows how close-on-exec flags both prevent descriptor leaks and enable reliable detection of exec failures.

Key takeaways

Chapters

0:00 Reviewing Shell Redirection and File Descriptors
3:00 The pipe System Call Creates a One-Way Byte Channel
6:15 Using fork to Send a Message Between Processes
11:00 Pipe EOF Requires Every Write End to Be Closed
20:00 dup2 Connects Pipe Ends to Standard Input and Output
26:48 Running tr Through a Pipe and Avoiding Inherited Write Ends
34:13 Inspecting Leaked Descriptors and Setting Close-on-Exec
39:00 Close-on-Exec Flags and the Ambiguity of Exit Status
43:13 Reporting exec Failures Through a Close-on-Exec Pipe

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:49 All righty. Welcome back to operating systems again. All right. So, this is fun. So, you can lab [snorts] one posted. Wait, am I Yeah. Okay. I've got everything's good. So, lab one or lab two, yes, posted. You can do all the week one stuff. I had it divided into weeks as like suggestions to kind of help you. You do not need to do all the week one stuff in week one. Again, it's just suggestions based off what I knew your knowledge was at that point. So, you can do everything up to there. After I complete today's lecture, will probably not be today. It'll probably be Thursday. But then you can do all the week 2 stuff because it's more confusing. So what are we doing? We're doing more advanced IPC today. So as we recall from our last lecture,

1:38 we we're redirecting and playing with file descriptors and knew that our shell could redirect file descriptors and all that fun stuff. So as a review that left arrow, we now know that in order for my shell to run this process, it would have forked itself then done something with the file descriptors and then done an execve v system call to start running a different program. So this arrow would have just made sure that before it exec this program and started running it would have made sure that file descriptor zero aka standard in actually referred to this file. So again file descriptors just referred to some type of resource in the kernel just through their index

2:26 number. So everyone remembers that? Everyone's good with that. Perfect. So this one I did like hand wavy ad. I would said we connected two process together. I said this little weird weird bar made it so that if we had this cat

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jon Eyolfson.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.