File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ class Descriptor {
37
37
Descriptor (const std::string& name, android::base::unique_fd fd)
38
38
: name_(name), fd_(std::move(fd)){};
39
39
40
+ // Publish() unsets FD_CLOEXEC from the FD and publishes its name via setenv(). It should be
41
+ // called when starting a service after fork() and before exec().
40
42
void Publish () const ;
41
43
42
44
private:
@@ -53,6 +55,9 @@ struct SocketDescriptor {
53
55
std::string context;
54
56
bool passcred = false ;
55
57
58
+ // Create() creates the named unix domain socket in /dev/socket and returns a Descriptor object.
59
+ // It should be called when starting a service, before calling fork(), such that the socket is
60
+ // synchronously created before starting any other services, which may depend on it.
56
61
Result<Descriptor> Create (const std::string& global_context) const ;
57
62
};
58
63
You can’t perform that action at this time.
0 commit comments