Reverse-Engineering a Linux Process with strace

The pill you took is part of a trace program. It's designed to disrupt your input/output carrier signals so we can pinpoint your location. And just like that, we can trace signals as they bounce around the Matrix, whether it's the Matrix that simulates Earth in 1999 or the Matrix that generates pretty pictures on … Continue reading Reverse-Engineering a Linux Process with strace

C Program to Generate a Blank MS-DOS Floppy Image in Linux

How do you do, fellow old-timers? Today's post is going to be a bit of a crossover, because I'm going to get into some programming stuff, some Linux stuff, and some DOS stuff all at the same time. I'm going to show you a program that I wrote a while back that uses POSIX API … Continue reading C Program to Generate a Blank MS-DOS Floppy Image in Linux

How to Generate Truly Random Numbers in POSIX Systems

Everyone knows about the rand() and srand() functions in the C Standard Library (or any of the equivalents in other programming languages). These functions work together to generate pseudo-random numbers from a seed, thus lending some nondeterminism to the program. But what about truly random numbers? What if you want a stream of random data … Continue reading How to Generate Truly Random Numbers in POSIX Systems

How to Write a Daemon Process in C

I thought I'd do another C tutorial, since I haven't done anything on C programming in a while. In this tutorial I'd like to show you how you can write your own daemon processes, also sometimes known as servers. I'm not going to show you how to write a web server or anything like that, … Continue reading How to Write a Daemon Process in C

How to Get the Dimensions of a Linux Terminal Window in C

Here I will be addressing a topic of interest to those of you who want to write full-screen applications for the Linux terminal. Yes, you could use a library like curses for this, but I'm going to go a bit deeper than that and show you how it all works under the hood. Or at … Continue reading How to Get the Dimensions of a Linux Terminal Window in C