E
E
egorggegor2021-02-24 17:53:41
linux
egorggegor, 2021-02-24 17:53:41

Is it possible to make a daemon out of a program that reads a file?

There is a program that constantly reads a file and performs actions depending on what was read.
The next question is, is it possible to write a program that will be a demon, and at the same time open a file, read it?

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2021-02-24
@egorggegor

Yes, you can.

R
rPman, 2021-02-24
@rPman

Any program can be a daemon if it is configured to start automatically and if its work is in the background, hidden from the user.
Console programs, those that do not work with a graphical shell, can be such without alteration (and the graphical one can also be run in a fake xserver).
The configuration method is different for each version of linux, for example for ubuntu now it is systemd, the first example is from google .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question