mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Allow empty -- run/task/service descriptions => no progress
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
72c9681ffb
commit
992bab2f8f
1 file changed
+9
@@ -639,6 +639,15 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
||||
|
||||
while (*desc && isblank(*desc))
|
||||
desc++;
|
||||
} else {
|
||||
int pos;
|
||||
|
||||
/* Find "--\n" to denote empty/no description */
|
||||
pos = (int)strlen(line) - 2;
|
||||
if (pos > 0 && !strcmp(&line[pos], "--")) {
|
||||
line[pos] = 0;
|
||||
desc = &line[pos];
|
||||
}
|
||||
}
|
||||
|
||||
cmd = strtok(line, " ");
|
||||
|
||||
Reference in new issue
Block a user