How to create a temporary file in Linux

1.0 Temporary Files Quite often, we need temporary files in our programs. Some intermediate data needs to be stored and the file can be discarded when the process terminates. There are multiple ways of creating temporary files in Linux. The best way to create a temporary file in Linux is to use the O_TMPFILE flag …

How to create a temporary file in Linux Read More »

File I/O in Linux

1.0 Input and Output (I/O) All programs need to interact with the external world which makes I/O important. Programs store data in files which provide large persistent storage. In this post we will look at the system calls and functions for file I/O and the issues that govern the program and I/O device interaction. 2.0 …

File I/O in Linux Read More »

Gtk-WARNING **: cannot open display:

While running a GTK+ based C program under Cygwin, the following runtime error is observed, Gtk-WARNING **: cannot open display: SOLUTION Make sure that Cygwin/XServer is installed and is running. If it is not installed, download the relevant packages from Cygwin. Make sure that environment variable DISPLAY is defined in the shell's environment. If DISPLAY …

Gtk-WARNING **: cannot open display: Read More »