-
Notifications
You must be signed in to change notification settings - Fork 27
Romanchuk_Evgenii_5030102/10201 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Требуется много исправлений:
- Перенесите весь код в поддиректорию lab1 Вашей именной директории.
- При сборке получается много мусорных файлов, хотя нужно в результате сборки иметь именно 1 файл - файл, реализующий демона. Как я понял - у Вас остаются остальные файлы, но не файл с программой
- При сборке демон сразу запускается: это больше мешает, чем помогает. Уберите это, пожалуйста
- При сборке произошла ошибка, которую приходилось чистить руками удаляя Вами закомиченный билд. Это собственно отсылка к первому пункту
Проверить функционал я смогу только тогда, когда поправите первые 4 пункта. Также есть пункты по коду, их стоило бы исправить
@@ -0,0 +1,134 @@ | |||
#include "daemon.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А для чего нужен этот файл?
void run(const std::string& config_file); | ||
void reload_config(); | ||
|
||
void set_sighup() { got_sighup = 1; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я верю что Вы умеете в многопоточку. Прошу Вас переписать механизм обработки сигналов, разумно используя линуксовские методы, например: signal.
return EXIT_FAILURE; | ||
} | ||
|
||
openlog("daemon", LOG_PID | LOG_CONS, LOG_DAEMON); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это очень странно: открывать тут лог, и или не закрывать его, или закрывать, делегируя это уже на класс Daemon (у Вас, как я понял, он не закрывается, хотя есть методы соответствующие). Вынесите работу с логом отсюда внутрь класса Daemon, а также закрывайте логи
@@ -0,0 +1 @@ | |||
"/home/jeka/Рабочий стол/learning/labs/Operating-Systems-labs-2024/Romanchuk.Evgenii/Folder_1" "/home/jeka/Рабочий стол/learning/labs/Operating-Systems-labs-2024/Romanchuk.Evgenii/Folder_2" 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Использование абсолютных путей - это неудобно для Вашей задачи. Лучше бы сделать поддержку относительных путей, которые бы считались относительно сбилженного файла
No description provided.