Post B0J9YaEGfEhPyFpKwC by jschauma@mstdn.social
(DIR) More posts by jschauma@mstdn.social
(DIR) Post #Axjx2KOmhl69oMSbOS by jschauma@mstdn.social
2025-08-31T20:23:30Z
0 likes, 4 repeats
It's that time of year again! The Fall semester is about to start, and I'm teaching "Advanced Programming in the UNIX Environment". The syllabus and all course materials including all code examples is available here:https://stevens.netmeister.org/631/All video lectures are public and available for free on YouTube:https://www.youtube.com/@cs631apue/videosIf you want to follow along, I'll be posting lecture videos and related links in this thread throughout the semester.#programming #unix #apue
(DIR) Post #AxjxFqRas9GoxkDg7E by jae@darkdork.dev
2025-08-31T20:42:38.303829Z
0 likes, 0 repeats
@jschauma this is so good. archiving!
(DIR) Post #Axz6RRQ5YFWjmiWEW8 by jschauma@mstdn.social
2025-09-02T14:50:47Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentWeek 1: IntroductionThis video covers a lot of the meta information (what do we do, why are we doing it, how are we doing it, syllabus, etc.). Some things have changed since I created the video (for example, we now have an AI policy: https://stevens.netmeister.org/631/use-of-ai.html), but most of it remains accurate.https://youtu.be/BsB9Cg6yJc4#apue #programming #unix
(DIR) Post #Axz6RSl2ZpsfvzKToW by jschauma@mstdn.social
2025-09-04T14:33:54Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentWeek 1: UNIX HistoryWe cover the early days at Bell Labs, USL vs BSDi, the birth of the BSDs and Linux, and how we got from Ken Thompson playing "Space Travel" on a PDP-7 to Unix running on your phone, fridge, and TV.https://youtu.be/3H7SQWTR6DwScroll along through it all here: https://www.levenez.com/unix/unix.pdf#apue #unix #linux #netbsd #freebsd
(DIR) Post #Axz6RTm8nEM55gqsAS by jschauma@mstdn.social
2025-09-06T17:53:43Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentWeek 1: UNIX BasicsIn this lecture, we provide a whirlwind tour of the Unix programming environment. In the process, we write a simple shell, a simple version of the ls(1) command, and two versions of the cat(1) command while learning about the Unix Philosophy.https://youtu.be/w3spRzZ8bSA#apue #unix #programming
(DIR) Post #Axz6RUIkpyRWiq6v0C by jschauma@mstdn.social
2025-09-07T17:44:50Z
1 likes, 0 repeats
Advanced Programming the UNIX EnvironmentOur reference platform for this class is NetBSD. Some ways to get set up are:Use an AWS image:https://stevens.netmeister.org/615/netbsd-amis.htmlCreate your own AWS image:https://www.netmeister.org/blog/creating-netbsd-ec2-amis.htmlhttps://www.netmeister.org/blog/netbsd-amd64-ami.htmlInstall NetBSD on a Linode:https://www.netmeister.org/blog/netbsd-on-linode.htmlUse UTM / qemu:https://stevens.netmeister.org/631/utm/https://www.youtube.com/watch?v=hCqfmuG5Acc#NetBSD #apue #AWS #Linode
(DIR) Post #Ay6Qo6bQTPSj4VcruS by jschauma@mstdn.social
2025-09-08T15:52:09Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentSome additional hints to set up your NetBSD environment for this class:https://stevens.netmeister.org/631/vm-setup.htmlWith all sources extracted, familiarize yourself with ctags(1) et al to make browsing code a breeze:https://youtu.be/TWog5NklSws#apue #programming #unix #netbsd
(DIR) Post #Ay6Qo83T4dUHZlkmG0 by jschauma@mstdn.social
2025-09-09T16:25:46Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentWeek 2: File DescriptorsTo introduce the concept of file descriptors, let's start with a simple question: how many file descriptors can a unix process open? In the process we encounter different limits that may apply across the system, for a given user, or just a process.https://youtu.be/h5A1OQjuCqk#apue #programming #unix
(DIR) Post #Ay6Qo8r667Bc3gyPc8 by jschauma@mstdn.social
2025-09-11T16:52:45Z
0 likes, 0 repeats
Advanced Programming the UNIX EnvironmentWeek 2: open(2) and close(2)Having introduced the concept of file descriptors, let's look at what happens when we try to create a file, "create" an existing file, open an existing file, truncate a file, and look at the various other flags we can pass to open(2).We also note the perhaps surprising number of ways in which open(2) can fail and take a look at openat(2) and TOCTOU defenses.https://youtu.be/QnL4eYpb5Iw#apue #unix #programming
(DIR) Post #AyuQJwlDAOJHPOIcBk by jschauma@mstdn.social
2025-10-05T19:17:44Z
0 likes, 1 repeats
Advanced Programming in the UNIX EnvironmentWeek 4: getpwuid(2) and /etc/groupsIn this video lecture, we look at the library functions used to look up account information. We learn about how primary and supplementary groups are handled as well as how the hashed passwords are stored outside of the world readable /etc/passwd file.https://youtu.be/aomkx6_aWpc#apue #unix #programming
(DIR) Post #Ayw44gyrkAxpRuvWam by jschauma@mstdn.social
2025-10-06T14:25:39Z
0 likes, 0 repeats
Advanced Programming in the UNIX EnvironmentWeek 4: atime, mtime, ctimeIn this video lecture, we start looking a little bit closer into what our systems think of "time", something that experts most accurately describe as a big ball of wibbly, wobbly, timey, wimey... stuff. In short, analyze how the atime, mtime, and ctimes of a file connect.https://youtu.be/ffYEEj5vnlw#apue #unix #programming
(DIR) Post #Ayyp7vNdkO2H8hTgQ4 by jschauma@mstdn.social
2025-10-07T14:35:29Z
0 likes, 0 repeats
Advanced Programming in the UNIX EnvironmentWeek 4: time(3) is an illusionHaving revisited the atime, mtime, and time in our last video segment, we now have to come to terms with time(3) itself. We'll discuss managing the data structures and handling arbitrary concepts such as leap seconds, timezones, and (ugh) Daylight Savings Time. It gets silly real quick.https://youtu.be/3N2aH1vUacQ#apue #unix #programming
(DIR) Post #Ayyp7wXxPVsmkzJR8i by shalien@mastodon.projetretro.io
2025-10-07T22:44:21Z
0 likes, 0 repeats
@jschauma ok so leap seconds get a pass but not dst ?
(DIR) Post #B0J9YY76WtmTPSSaUi by jschauma@mstdn.social
2025-10-08T13:54:41Z
0 likes, 0 repeats
Related to our discussion of time(3), here's a deeper dive into the Unix epoch, its origins, and how the Y2K38 issue actually affects different unix systems well before the heat-death of the universe.https://www.netmeister.org/blog/epoch.html#apue #unix #programming #time
(DIR) Post #B0J9YZCoT9wQnS8f20 by jschauma@mstdn.social
2025-10-09T14:15:04Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The Unix Development EnvironmentThis week, we cover the concept of the Unix userland as an Integrated Development Environment. This introduction outlines the different tools we will cover in subsequent videos, including the editor, the compiler chain, make(1), the debugger, and code revision and management tools. No vibe coding here.https://youtu.be/QYwYLR3UD2w#apue #unix #programming
(DIR) Post #B0J9YaEGfEhPyFpKwC by jschauma@mstdn.social
2025-10-10T14:08:06Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The EditorIn this video lecture, we look at the required feature for a full-fledged programmer's editor and illustrate some of the core functionality by example of vim(1). This includes basic motion commands, setting and moving to markers, using folds, and the use of the ':make' and quick fix lists to address compiler errors efficiently.(Don't worry, we'll talk about ed(1) later.)https://youtu.be/DdaJ87G9Kes#apue #unix #programming #vim
(DIR) Post #B0J9YahKv9x3QPQYFM by jschauma@mstdn.social
2025-10-11T17:36:51Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The Compiler Chain, Part IIn this video lecture, we begin our discussion of compilers as part of the Unix programming environment. We provide a high-level overview of how compilers process input source code and turn it into an executable.https://youtu.be/SOeo4zLBqdI#apue #unix #programming #gcc
(DIR) Post #B0J9YbYVjSUC5KJ184 by jschauma@mstdn.social
2025-10-12T15:33:53Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The Compiler Chain, Part IIIn this video lecture, we look at the preprocessing stage of the compiler and observe how it invokes the cpp(1) command to include header files or replace macro definitions in place.https://youtu.be/8qPxQ3g8bso#apue #unix #programming #gcc
(DIR) Post #B0J9YbvuKTCXFtFhb6 by jschauma@mstdn.social
2025-10-12T21:22:47Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The Compiler Chain, Part IIIIn this next-to-last part on the compiler chain, we look at the compilation proper and the optimization and assembly of the intermediate code into an object file. (We will revisit some of this when we take a closer look at shared libraries in week 11.)https://youtu.be/ddvYL-G3oew#apue #unix #programming #gcc
(DIR) Post #B0J9Yd7HvdtmvTaIyW by jschauma@mstdn.social
2025-10-13T12:43:53Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: The Compiler Chain, Part IVIn this video lecture, we conclude our discussion of the compiler chain, analyzing the last step in the process: linking the object files into the executable. We identify aspects of the C Runtime libraries as well as the standard C library that we need to include and cover a few of the most important flags to ld(1).https://youtu.be/8LCyPmjknBY#apue #unix #programming #gcc
(DIR) Post #B0J9YdSudFCE0XhZgG by jschauma@mstdn.social
2025-10-13T18:52:36Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: make(1)Moving on from the compiler, we now look at how the make(1) utility can be used to help us selectively build our code project.https://youtu.be/WLTuUtj7LPw#apue #unix #programming #make
(DIR) Post #B0J9YeJ1VUsccA5BuC by jschauma@mstdn.social
2025-10-14T14:17:09Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: Debugging your codeNext in our discussion of the Unix _development_ environment, we start a short series on the use of a debugger by example of gdb(1). First, we illustrate just why exactly we might want to use a separate tool instead of sprinkling "printf" statements all over our code...https://youtu.be/61YwbTQy2G0#apue #unix #programming #gdb
(DIR) Post #B0J9YeaOSum5U2D3yq by jschauma@mstdn.social
2025-10-14T18:57:24Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: Using gdb(1)Alright, let's look at gdb(1)! We begin by using it to troubleshoot our failing programs and immediately identify the location of our program where it segfaults. We also see how to inspect variables and call functions from within the debugger.https://youtu.be/Miw0XLzHCws#apue #unix #programming #gdb
(DIR) Post #B0J9YfeKVlW8mX3ikq by jschauma@mstdn.social
2025-10-15T03:50:13Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: Using gdb(1), part IIIn this video lecture, we continue to explore the capabilities of the debugger. We show how you can set a breakpoint to pause the program and how to step through the program while watching our code.https://youtu.be/fOp4Q4mnTD4#apue #unix #programming #gdb
(DIR) Post #B0J9YfwPQXylgbW9w0 by jschauma@mstdn.social
2025-10-15T13:24:28Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: Using gdb(1), part IIIIn this video lecture, we'll use our newly learned debugging skills to analyze and fix yet another flawed program. In the process, we learn to debug code from multiple source files and find out how to change the value of variables while the program is running.https://youtu.be/hgcj7iAxhhU#apue #unix #programming #gdb
(DIR) Post #B0J9Ygg8gWYhyQugDI by jschauma@mstdn.social
2025-10-15T20:07:07Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 5: Using gdb(1), part IVIn our last segment on gdb(1), we use the debugger to examine memory locations in a running program and illustrate how pointers and arrays work in the C programming language.https://youtu.be/hr-rn0yUhAw#apue #unix #programming #gdb
(DIR) Post #B0J9Yh1PPRZZ2OrfMm by jschauma@mstdn.social
2025-10-16T13:49:08Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentTool Tip: ed(1) is the standard text editorAs part of our discussion of unix development tools, we take a short detour to provide a quick walkthrough of ed(1), the standard text editor. This is not done merely to up your geek creds, but understanding ed(1) will also helps us better understand other tools like vi(1), sed(1), and ultimately even things like diff(1) and patch(1) better.https://youtu.be/mRZsV7aMK0I#apue #unix #programming #ed
(DIR) Post #B0J9YhyFsedzyuOf5c by jschauma@mstdn.social
2025-10-17T12:28:27Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Memory Layout of a ProcessLet's talk about the details of a process. We start with a visual representation of a process in memory and create a program that prints out the addresses of different elements of a program and observe the alignment of the text, data, and bss segments as well as the placement of the heap and stack. We also illustrate what a stack overflow looks like.https://youtu.be/aHmcowhoOzU#apue #unix #programming
(DIR) Post #B0J9YijP3MMGL8SJZw by jschauma@mstdn.social
2025-10-19T15:47:53Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Program StartupIn this video lecture, we learn how a program starts. "What, you write 'main()' and off you go!" you say? Not so fast! Let's look at the program entry point '_start' and see if we can change it, and in the process find out that the function prototype of 'main' may not be what you think it is. Use your debugger to better understand how the process begins and ends its life.https://youtu.be/Yul4d-BDdx8#apue #unix #programming
(DIR) Post #B0J9YiuOOV9GtDb5hw by jschauma@mstdn.social
2025-10-20T15:33:30Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Process TerminationAfter we talked about program startup in our previous video, we now look at how programs terminate. We observe the return status and how exit handlers are registered.https://youtu.be/xNeEw1f_js8#apue #unix #programming
(DIR) Post #B0J9YjY60suKsMAnaq by jschauma@mstdn.social
2025-10-21T02:47:12Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Process TerminationRelevant to our discussion of process termination, using the debugger to understand program behavior, our little pop quiz "What does `int main() { printf("Hello World!\n"); }` return?" provides for a short detour into the realm of nasal daemons: https://www.netmeister.org/blog/return-printf.html#apue #unix #programming
(DIR) Post #B0J9Yk1WFURYLbwISG by jschauma@mstdn.social
2025-10-21T15:19:32Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: The EnvironmentIn this video lecture, we're going to take a look at the process environment. We'll use what we learned about the process layout in memory to understand how the environment variables are stored and, if necessary, moved around. We'll also get a quick look at what malloc(3) does.https://youtu.be/8DEPA6nJXNY#apue #unix #programming
(DIR) Post #B0J9YksL56h6zQeTmi by jschauma@mstdn.social
2025-10-22T13:39:04Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Process Limits and IdentifiersIn the last few videos, we've looked at the details of the process layout in memory, and how a process starts and is terminated. In this video lecture, we we will spend a few short minutes on two additional aspects of every process: its resource limits and its process ID.https://youtu.be/bnki8QKjSfQ#apue #unix #programming
(DIR) Post #B0J9Yl905A1Pp6Rmkq by jschauma@mstdn.social
2025-10-23T14:53:39Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 6: Process ControlIn this video lecture, we will look at process control: how new processes are started from an executable, and what happens when they terminate. In particular, we will look at the fork(2), exec(3), and wait(2) system calls. Be warned, though: there will be zombies, so limber up.https://youtu.be/KJq5nTCFsIg#apue #unix #programming
(DIR) Post #B0J9Yls1Nm2C4jVjvc by jschauma@mstdn.social
2025-10-24T13:48:46Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 7: The Login ProcessWe'll begin our discussion of process relationships, including process groups, sessions, and our first, asynchronous type of inter process communication in the form of signals. To get us started, we look at how processes created during the normal Unix boot process relate to one another.(This does not include systemd. I said "the normal Unix boot process". init or gtfo)https://youtu.be/eNYTJbmYzH8#apue #unix #programming
(DIR) Post #B0J9Ym92MVe4vVTKS0 by jschauma@mstdn.social
2025-10-26T15:22:24Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 7: Job ControlIn this video lecture, we illustrate the concept of job control in the shell, first introduced in the C shell, and allowing you to run multiple tasks from within the same terminal, switching back and forth between them by placing them into the background, suspending them, or bringing them to the foreground. It's one of my all-time favorite productivity hacks - Ctrl+Z FTW!https://youtu.be/l6-663i8bwQ#apue #unix #programming
(DIR) Post #B0J9Yn5spiiVs10KAq by jschauma@mstdn.social
2025-10-27T13:23:32Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 7: SignalsIn this video lecture, we look at Unix signals, simple, asynchronous event notifications. We run through a number of examples to illustrate how signals are delivered, can be ignored, caught, handled, or blocked.https://youtu.be/Vh7rBGj0Ty4#apue #unix #programming
(DIR) Post #B0J9YnoCAyA85RjiF6 by jschauma@mstdn.social
2025-10-28T14:52:08Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 7: Reentrant and Interrupted FunctionsWith this video lecture, we will conclude our coverage of Unix signals, by looking at what happens when we call unsafe functions from within the signal handler as well as what happens when we are interrupted while blocking on certain I/O.https://youtu.be/0GRLhpMao3I#apue #unix #programming
(DIR) Post #B0J9Yo3nEydgrp2AYS by jschauma@mstdn.social
2025-10-30T16:51:00Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 8: Interprocess Communications IntroThis week, we begin our discussion of Interprocess Communication. We start by providing a quick overview of the different properties of IPC mechanisms as well as which mechanisms we will cover.https://youtu.be/JHV2dsGZUzk#apue #unix #programming
(DIR) Post #B0J9YokgfUwz0r6QPg by jschauma@mstdn.social
2025-11-01T18:41:54Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 8: System V IPCIn this video lecture, we cover traditional, primarily asynchronous System V Inter Process Communication: semaphores, shared memory, and message queues. We then also take a brief look at the POSIX message queues implementation.https://youtu.be/hTUquvhWysA#apue #unix #programming
(DIR) Post #B0J9Yp85GVfKBQ36si by jschauma@mstdn.social
2025-11-02T16:41:42Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 8: Pipes and FIFOsWith this video lecture, we continue our discussion of Interprocess Communication and dive into two of the oldest and most ubiquitous forms of Unix IPC: pipes and FIFOs. We also discuss popen(3) and the dangers of shelling out to unverified commands.https://youtu.be/mq5G33Sbc_o#apue #unix #programming
(DIR) Post #B0J9YpbVV7CXefobk8 by jschauma@mstdn.social
2025-11-04T03:55:26Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentDid you know that #NetBSD comes with a number of historical Unix research papers and supplementary documentation? Here, we find papers by Marshall Kirk McKusick on the Fast File System, by Robert Morris and Ken Thompson on Password Security, a shell tutorial by Stephen R. Bourne, a guide to using vi(1) by Bill Joy, and the well known BSD IPC Tutorials! Take a tour through /usr/share/doc...https://youtu.be/XqhOUqi4fc0#apue #unix #programming
(DIR) Post #B0J9YqQYRK2CCzhNJI by jschauma@mstdn.social
2025-11-04T17:48:08Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 9: socketpair(2)Let's continue with the above mentioned IPC tutorial and discuss the socketpair(2) system call and compare its functionality with that of the pipe(2) call. This introduces the concept of sockets, domains, and protocols, which we'll dive into in the next few videos.https://youtu.be/w6Au54pVt-8#apue #unix #programming
(DIR) Post #B0J9YqoJ1127OeoLKa by jschauma@mstdn.social
2025-11-05T16:37:55Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 9: socket(PF_LOCAL, SOCK_DGRAM, 0)Following up on socketpairs, we're continuing our discussion of the sockets API by an example of datagram connections in the PF_LOCAL (formerly AF_UNIX) domain.https://youtu.be/7LoLt49oB9A#apue #unix #programming
(DIR) Post #B0J9YrcI1B11tgCGEy by jschauma@mstdn.social
2025-11-06T16:35:00Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 9: socket(PF_INET, SOCK_DGRAM, 0)We're finally moving on to network communications, and show how to communicate between hosts across the internet using datagram sockets in the PF_INET domain, that is, via UDP. We also observe the packets as they are sent by using the tcpdump(8) utility.https://youtu.be/MMQ50PADnrY#apue #unix #programming
(DIR) Post #B0J9YrxClPkIwXyxqC by jschauma@mstdn.social
2025-11-07T16:09:11Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 9: socket(PF_INET6, SOCK_STREAM, 0)In this video, we demonstrate sockets using TCP to establish a sequenced, reliable, two-way byte stream over an #IPv6 network. Our good friend tcpdump(8) helps us inspect the packets on the wire to observe the 3-way handshake, data being exchanged, and connection tear down or observing a reset (RST) packet from the server if it's not listening on the port.https://youtu.be/qKMXw76Dk1o#apue #unix #programming
(DIR) Post #B0J9YspRVl8BelMHNg by jschauma@mstdn.social
2025-11-08T17:25:11Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 9: I/O MultiplexingWith this video, we complete our discussion of interprocess communication and move from one-to-one communications towards a more typical client-server model with a server side process capable of handling multiple simultaneous clients. We accomplish this by using the select(2) syscall to handle synchronous I/O multiplexing.https://youtu.be/Y5PiHboUctw#apue #unix #programming
(DIR) Post #B0J9YtI9n06F5onD8a by jschauma@mstdn.social
2025-11-13T14:33:08Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 10: Dæmon ProcessesIn this video lecture, we take a quick look at processes intended to run continuously and in the background: daemon processes. We'll also brush upon system start scripts and daemon/service conventions.https://youtu.be/YbYQqVMv7b8#apue #unix #programming
(DIR) Post #B0J9YtiODT5EPB4A1g by jschauma@mstdn.social
2025-11-15T20:57:09Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 11: The Executable and Linkable FormatThis week, we begin our exploration of shared libraries. We start with a look at the Executable and Linkable Format (ELF) for binary files such as executables, object files, core files and shared libraries. We'll use the hexdump(1) and readelf(1) utilities to better understand the format.https://youtu.be/i1UDF05iZPU#apue #unix #programming
(DIR) Post #B0J9YtrFgWAkqfDEq8 by jschauma@mstdn.social
2025-10-25T15:58:17Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 7: Process Groups and SessionsLet's take a look at how processes are grouped together and begin to develop an understanding of how a login session relates to the controlling terminal.https://youtu.be/NfHqGv0PlIw#apue #unix #programming
(DIR) Post #B0J9YuIu1iI4EQ9JwG by jschauma@mstdn.social
2025-11-16T15:58:23Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 11: Of Linkers and LoadersPicking up where we left off when we talked about the compilation and linking process in Week 05, we now take a look at how a relocatable object file is turned into an executable by the dynamic linker (ld) and how an executable is loaded into memory by the run-time link-editor (ld.so or ld.elf_so).https://youtu.be/8KWuz7gLycc#apue #unix #programming
(DIR) Post #B0Nr4ewm6Xih5Ohhnk by jschauma@mstdn.social
2025-11-18T22:25:55Z
1 likes, 1 repeats
Advanced Programming in the Unix EnvironmentI often see students confuse the "sizeof" operator and the "strlen" library function, especially when mixing fixed-sized buffers vs. pointers. So as a brief intermezzo, let's explain the difference between the two.https://youtu.be/FyPqII2rewABased on that, I eventually ended up writing a manual page for 'sizeof', which is now included in #FreeBSD:https://man.freebsd.org/cgi/man.cgi?query=sizeof#apue #unix #programming
(DIR) Post #B0RjDj2iUaSC4BJgmW by jschauma@mstdn.social
2025-11-19T21:01:44Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 12: syslog(3)In this video lecture, we take a look at the standard Unix central logging facility, syslogd(8), and the syslog(3) library function. We show examples of system logs and how to separate messages by priority and level.https://youtu.be/YfdAJ8rhG-IBelow is an accurate capture of syslogd(8) in action:#apue #unix #programming
(DIR) Post #B0RjDkcubV06yjG6q0 by jschauma@mstdn.social
2025-11-20T19:16:24Z
2 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 12: Non-blocking I/OContinuing our grab bag of miscellaneous topics, we briefly cover non-blocking I/O, whereby a system call that would normally block, waiting for I/O, returns immediately with an errno of EAGAIN or EWOULDBLOCK. We use the examples of I/O into a pipe (restricted to PIPE_BUF bytes at a time) or over the network using TCP with its buffer.https://youtu.be/_hOLO_27L7U#apue #unix #programming
(DIR) Post #B0TaFdmaVfZn3nWxyS by jschauma@mstdn.social
2025-11-21T16:45:39Z
1 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 12: Resource LockingMore miscellaneous "advanced I/O" - this time we discuss resource- and record locking using flock(2), lockf(3), and fcntl(2).https://youtu.be/017DtsMRHjg#apue #unix #programming
(DIR) Post #B0bhavRjZfImxXQjxY by jschauma@mstdn.social
2025-11-25T14:45:22Z
1 likes, 1 repeats
Advanced Programming in the Unix EnvironmentWeek 12: Asynchronous and Memory Mapped I/OWith this video, we conclude our short series on advanced I/O topics with a quick summary of asynchronous (aio(7)) and memory mapped I/O (mmap(2)).https://youtu.be/_R_t0d5BzEk#apue #unix #programming
(DIR) Post #B0deIXMsRmafWTcPVw by jschauma@mstdn.social
2025-11-26T13:17:50Z
1 likes, 1 repeats
Advanced Programming in the Unix EnvironmentWeek 12: Cryptographic BasicsA segment on where and how cryptography can help solve certain security issues, including a few code examples for how to handle secrets/passwords (and how they linger in memory!), how to hash passwords, and the impact of poor pseudo-random number generators (with a blast from the past via the 2008 Debian weak keys).Lecture slides:https://stevens.netmeister.org/631/12-cryptobasics.pdf#apue #unix #programming
(DIR) Post #B0mNZu0PaHrNrCRbvM by jschauma@mstdn.social
2025-11-28T18:50:50Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: POSIX ACLsThis week we're diving deeper into ways to restrict processes. We begin with a review of standard Unix file permissions and then show how POSIX.1e Access Control Lists (ACLs) can be used for more fine-grained control.https://youtu.be/lCACl3NE058#apue #unix #programming
(DIR) Post #B0mNZvCr7VPNa5H3xY by jschauma@mstdn.social
2025-11-29T16:09:28Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: eUIDs, file flags, mount options, securelevelsIn this video lecture, we look at new ways to restrict processes and even root itself. We revisit how we change effective UIDs using setuid, su(1) and sudo(8), and then cover file flags, certain mount options, and BSD securelevels.https://youtu.be/WBm5j-XAyVk#apue #unix #programming
(DIR) Post #B0mNZvuSVOHplJfsvI by jschauma@mstdn.social
2025-11-30T18:22:49Z
1 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: Restricted shells, Chroots, JailsIn this video lecture, we cover restricted shells, the chroot(2) syscall, and FreeBSD jails as ways to contain users and processes beyond file access controls.https://youtu.be/UF7gNYaZuG0#apue #unix #programming #freebsd
(DIR) Post #B0sMN1HeHNoxevYl04 by jschauma@mstdn.social
2025-12-01T14:53:09Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: Process PrioritiesIn this video lecture, we revisit resource utilization by processes and how to set their CPU scheduling priority or "niceness". We discuss dynamic priority scheduling algorithms and the use of the nice(1) and renice(8) utilities.https://youtu.be/icjvv-RFm1I#apue #unix #programming
(DIR) Post #B0sMN2Xza6ULZuDK76 by jschauma@mstdn.social
2025-12-02T15:52:43Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: Processor Affinity and CPU SetsIn this video lecture, we discuss how we can restrict a process to a specific CPU or set of CPUs by way of "CPU pinning" or processor affinity and via CPU sets.https://youtu.be/sy8121p4pjwThis lecture also exists as a blog post version as well:https://www.netmeister.org/blog/cpu-pinning-and-sets.html#apue #unix #programming
(DIR) Post #B0sMN3Et0cndiwHZyK by jschauma@mstdn.social
2025-12-03T15:37:45Z
1 likes, 1 repeats
Advanced Programming in the Unix EnvironmentWeek 13: Restricting Processes: Capabilities, Control Groups, ContainersIn this video lecture, we're completing our discussion on how to restrict processes by looking at POSIX Capabilities, Linux Namespaces and Control Groups or "cgroups", and how these and the various other methods we've discussed in the last few videos allow us build containers like Docker or LXC.https://youtu.be/ozzyh5wjjdw#apue #unix #programming
(DIR) Post #B14AGuH4Ykdgd67zRw by jschauma@mstdn.social
2025-12-09T04:03:43Z
0 likes, 0 repeats
Advanced Programming in the Unix EnvironmentThe entire semester in one 157 slides deck: https://stevens.netmeister.org/631/f25.pdfFull playlist on youtube of all 72 video lectures: https://www.youtube.com/watch?v=BsB9Cg6yJc4&list=PL0qfF8MrJ-jxMfirAdxDs9zIiBg2Wug0z#apue #unix #programming
(DIR) Post #B14AGvd5WNqMpfR5P6 by PeterSommerlad@mastodon.social
2025-12-09T08:18:43Z
1 likes, 1 repeats
@jschauma It is astonishing how much of my 1980s teaching of UNIX systems programming is still relevant. i would say that I covered at least 70% of that material then in my trainings (System V was current then)