Hello
I am creating a C program that is called from a shell script when a specific event is occurring. The C program gets an argument from the shell script like this:
> ./c-program.bin HELLO
Now the C program is running until it recieves a specific character as an argument. The problem is that if a second event occurs, and the C program is now called like this:
./c-program.bin WORLD
Then it is a new instance of the program that is started that knows nothing about the string from the first event. What i would like to achieve is something like this:
[EVENT0] ./c-program.bin HELLO
[EVENT1] ./c-program.bin WORLD
[EVENT2] ./c-program.bin *
c-program output:
HELLO WORLD
Any ideas on how to only have one instance of the program? The platform is Linux. The project is in its planning fase therefore, i do not have any specific code so far, i am trying to sort out the different problems first.