Introduction
In the previous chapter, we looked at how to write simple command-line applications. We will carry on with this here, introducing ways to pass parameters to our application so that it behaves differently depending on the values we send.
After that, we will interact with the filesystem. The levels we are going to be working with the filesystem at are the file, directory, and permission levels. We will tackle everyday issues that developers face when working with the filesystem.
We will learn how to create a command-line application that will read and write files. Along with discussing what happens when we get a signal interrupt from the OS, we will demonstrate how to perform cleanup actions before our application stops running. We will also handle a scenario of receiving an interrupt to our application and handling how the application exits. There are times when your application is running, and a signal comes from the OS to shut down the application.
In such instances...