Merge "init: reset errno in do_start" into main
This commit is contained in:
commit
0508911496
1 changed files with 1 additions and 0 deletions
|
|
@ -746,6 +746,7 @@ static Result<void> do_setrlimit(const BuiltinArguments& args) {
|
|||
static Result<void> do_start(const BuiltinArguments& args) {
|
||||
Service* svc = ServiceList::GetInstance().FindService(args[1]);
|
||||
if (!svc) return Error() << "service " << args[1] << " not found";
|
||||
errno = 0;
|
||||
if (auto result = svc->Start(); !result.ok()) {
|
||||
return ErrorIgnoreEnoent() << "Could not start service: " << result.error();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue