Skip to content

Conversation

@Forza-tng
Copy link
Contributor

@Forza-tng Forza-tng commented Feb 21, 2024

Introduced SSD_CPUSCHEDULER and SSD_CPUSCHEDULER_PRIO environment variables to complement the --scheduler command line argument.

Closes #657

Introduced `SSD_CPUSCHEDULER` and `SSD_CPUSCHEDULER_PRIO` environment variables to complement the `--scheduler` command line argument.
Introduced `SSD_CPUSCHEDULER` and `SSD_CPUSCHEDULER_PRIO` environment variables to complement the `--scheduler` command line argument.

// Handle SSD_CPUSCHEDULER for scheduler type
if ((tmp = getenv("SSD_CPUSCHEDULER"))) {
scheduler = strdup(tmp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why strdup?

Copy link
Contributor

@N-R-K N-R-K Mar 18, 2025

Choose a reason for hiding this comment

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

The  implementation  of  getenv() is not required to be reentrant.  The string pointed to by the return value of getenv() may be statically allocated,
and can be modified by a subsequent call to getenv(), putenv(3), setenv(3), or unsetenv(3).

Okay, I see.

.Va SSD_CPUSCHEDULER_PRIO
can also set the CPU scheduling priority of the daemon, but the command line
option takes precedence.
.Pp
Copy link
Contributor

Choose a reason for hiding this comment

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

Also should be added to supervise-deamon for consistency.

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.

Enhancement: SSD_SCHEDULER env variable for start-stop-daemon

2 participants