Pipes
Description
Plot.c
makes four file descriptors that are temporary files, it sends , , , values to gnuplot
infinitely.
First off, the program opens a process popen(command)
-pipe, fork, and process descriptor called plot 1 and plot 2-, then gnuplot
plot them and replot again each 250 ms when program calls PlotOne()
that writes new values on files and gnuplot
read them.
The program can stop when the user presses ctrl+c
, so quit()
is called; it removes files with another process popen(deletefiles, "w");
and closes file descriptors.
Screenshot