In part I, we learnt about the memory corruption and the probable causes. Presently, there are plethora Linux tools available to combat the issues of memory corruption. Such Linux tools assist a great deal in detecting the memory corruption and resolving them. In this article we will cover 3 popular open source tools available for […]
Every process in any operating system would use memory to store its code and data. Same is the case with processes in Linux. However, the onus is on the programmer to see if the memory is being properly used or not. This is essential, as memory issues lead to copious bugs and bizarre behaviours. As […]
Back in 2012, after my article on Linux ELF Virus was published in Linux Journal, I was curious to come up with a trigger point for this virus. I mean what would compel a Linux user to execute it for the very first time? I thought about it many times but could not come up […]
While designing a simple C program or a full fledged command line application, it is pretty usual to have a requirement for arguments to be passed while running the executable/application. These arguments are known as command line arguments. These parameters govern the behaviour of the program to some extent, as these are the inputs based […]
In this pacing world, time plays an important role in every aspect of Life. Even in industries like embedded, automotive etc time plays a very important role. Seems like everyone is working just to minimize this parameter called time. If we talk about software industry, here too, minimising the time complexity is the most prominent […]
If you have worked on Linux software development using C language, you would have definitely come across the gcc compiler. It is one of the most popular C compiler as of today. GCC contains a huge list of compiler options. For those who are new to gcc, they must have knowledge of some basic gcc compiler options. […]
Till now we have read that there are separate functions (unlink and rmdir) to delete files and directories in Linux. In this article, we will understand Linux remove function that is capable of deleting both files and directories in Linux.
In our last article on unlink() function here, we discussed how this function can be used to delete files. Also, this function has a limitation that it cannot be used to delete directories. Here in this article, we will discuss the Linux rmdir function. As the name suggests this function is used to delete directories […]
Sometimes it is required to delete a file present on disk from within the C code. In Linux this can be done through the Linux unlink function. This function holds the capability to delete the file but under certain conditions.
While writing C code for Linux programs, it’s very important to put in place proper error handling mechanism as it saves precious time while debugging any problem with the same code. Mostly developers write code that contains broken error handling and this causes them to invest hours while debugging a complex code. In this example […]