MCPcopy Create free account
hub / github.com/apache/mesos / create

Function create

src/linux/systemd.cpp:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299
300
301Try<Nothing> create(const Path& path, const string& data)
302{
303 Try<Nothing> write = os::write(path, data);
304 if (write.isError()) {
305 return Error("Failed to write systemd slice `" + path.string() + "`: " +
306 write.error());
307 }
308
309 LOG(INFO) << "Created systemd slice: `" << path << "`";
310
311 Try<Nothing> reload = daemonReload();
312 if (reload.isError()) {
313 return Error("Failed to create systemd slice `" + path.string() + "`: " +
314 reload.error());
315 }
316
317 return Nothing();
318}
319
320
321Try<Nothing> start(const string& name)

Callers 1

initializeFunction · 0.70

Calls 7

daemonReloadFunction · 0.85
NothingClass · 0.85
writeFunction · 0.70
errorMethod · 0.65
ErrorFunction · 0.50
isErrorMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected