-
Notifications
You must be signed in to change notification settings - Fork 27
Add files via upload #20
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?
Add files via upload #20
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.
Сделал поверхностный ревью кода, поскольку получил ошибку сборки через build.sh из директории "Operating-Systems-labs-2024/Marchenko_Elizaveta/lab1": bash: ./build.sh: bin/bash: bad interpreter: No such file or directory
Кроме того, добавьте тестовые примеры, чтоб я мог оценить работоспособность Вашей работы на различных сценариях
Спасибо
|
||
int main(int argc, char** argv) | ||
{ | ||
if (argc < 2) |
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.
Тут должно быть другое условие: в работе у Вас принимают участие ровно два аргумента
|
||
using namespace std; | ||
|
||
static void ReceiveSignal(int signal) |
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.
Архитектурно странное решение - почему это не часть класса Демона? Или почему эту функцию с функцией удаления не разместили в отдельном классе, отвечающий за рабочие процессы, запускаемые демоном? Обощая все это, вынесите это в отдельный или в тот же класс, просто висячие функции - дурной тон
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.
Скорее даже Вам стоит это добавить в класс Демона, поскольку Вы тут производите манипуляции с данными, с которыми этот Демон и работает
{ | ||
if (!filesystem::remove(file)) | ||
{ | ||
syslog(LOG_WARNING, "Removed was failed: \"%s\"", file.path().c_str()); |
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.