Skip to content

Conversation

ElizavetaMarchenko
Copy link

No description provided.

Copy link
Collaborator

@AS2 AS2 left a 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)
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Архитектурно странное решение - почему это не часть класса Демона? Или почему эту функцию с функцией удаления не разместили в отдельном классе, отвечающий за рабочие процессы, запускаемые демоном? Обощая все это, вынесите это в отдельный или в тот же класс, просто висячие функции - дурной тон

Copy link
Collaborator

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());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно логировать и удаление, когда оно успешно

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants