* The supervisor sets up the shared memory and the semaphores and initializes the circular buffer required
* for the communication with the generators. It then waits for the generators to write solutions to the
* circular buffer.
* The supervisor program takes no arguments.
* Once initialization is complete, the supervisor reads the solutions from the circular buffer and remembers the best solution so far, i.e. the solution with the least edges. Every time a better solution than the
* previous best solution is found, the supervisor writes the new solution to standard output. If a generator
* writes a solution with 0 edges to the circular buffer, then the graph is acyclic and the supervisor terminates. Otherwise the supervisor keeps reading results from the circular buffer until it receives a SIGINT
* or a SIGTERM signal.
* Before terminating, the supervisor notifies all generators that they should terminate as well. This can
* be done by setting a variable in the shared memory, which is checked by the generator processes before
* writing to the buffer. The supervisor then unlinks all shared resources and exits.
*
* SYNOPSIS
* supervisor
*
**/
#include "shared/shm.c"
intmain(intargc,char*argv[]){
if(argc>1){
fprintf(stderr,"ERROR: Command takes no arguments");