Home
last modified time | relevance | path

Searched refs:fail_fn (Results 1 – 4 of 4) sorted by relevance

/frameworks/base/core/jni/
Dcom_android_internal_os_Zygote.cpp213 static void WaitUntilDirReady(const std::string& target, fail_fn_t fail_fn);
542 fail_fn_t fail_fn) { in SetGids() argument
548 fail_fn(CREATE_ERROR("Failed to remove supplementary groups for child zygote")); in SetGids()
556 fail_fn(CREATE_ERROR("Getting gids int array failed")); in SetGids()
560 fail_fn(CREATE_ERROR("setgroups failed: %s, gids.size=%zu", strerror(errno), gids.size())); in SetGids()
564 static void ensureInAppMountNamespace(fail_fn_t fail_fn) { in ensureInAppMountNamespace() argument
570 fail_fn(CREATE_ERROR("Failed to unshare(): %s", strerror(errno))); in ensureInAppMountNamespace()
579 static void SetRLimits(JNIEnv* env, jobjectArray managed_rlimits, fail_fn_t fail_fn) { in SetRLimits() argument
593 fail_fn(CREATE_ERROR("rlimits array must have a second dimension of size 3")); in SetRLimits()
600 fail_fn(CREATE_ERROR("setrlimit(%d, {%ld, %ld}) failed", in SetRLimits()
[all …]
Dfd_utils.cpp181 static std::unique_ptr<FileDescriptorInfo> CreateFromFd(int fd, fail_fn_t fail_fn);
187 void ReopenOrDetach(fail_fn_t fail_fn) const;
215 void DetachSocket(fail_fn_t fail_fn) const;
220 std::unique_ptr<FileDescriptorInfo> FileDescriptorInfo::CreateFromFd(int fd, fail_fn_t fail_fn) { in CreateFromFd() argument
225 fail_fn(android::base::StringPrintf("Unable to stat %d", fd)); in CreateFromFd()
233 fail_fn("Unable to get socket name"); in CreateFromFd()
237 fail_fn(android::base::StringPrintf("Socket name not allowlisted : %s (fd=%d)", in CreateFromFd()
267 fail_fn(android::base::StringPrintf("Unsupported st_mode for FD %d: %s", fd, mode.c_str())); in CreateFromFd()
273 fail_fn(android::base::StringPrintf("Could not read fd link %s: %s", in CreateFromFd()
279 fail_fn(android::base::StringPrintf("Not allowlisted (%d): %s", fd, file_path.c_str())); in CreateFromFd()
[all …]
Dcom_android_internal_os_ZygoteCommandBuffer.cpp63 std::optional<std::pair<char*, char*>> readLine(FailFn fail_fn) { in readLine() argument
72 fail_fn("ZygoteCommandBuffer.readLine attempted to read from mFd -1"); in readLine()
79 fail_fn(CREATE_ERROR("session socket read failed: %s", strerror(errno))); in readLine()
82 fail_fn("ZygoteCommandBuffer overflowed: command too long"); in readLine()
93 fail_fn("ZygoteCommandBuffer.readLine attempted to read past end of command"); in readLine()
106 void readAllLines(FailFn fail_fn) { in readAllLines() argument
108 readLine(fail_fn); in readAllLines()
132 int getCount(FailFn fail_fn) { in getCount() argument
134 auto line = readLine(fail_fn); in getCount()
141 fail_fn(CREATE_ERROR("Unreasonable argument count %ld", nArgs)); in getCount()
[all …]
Dfd_utils.h74 std::unique_ptr<std::set<int>> GetOpenFds(fail_fn_t fail_fn);
84 fail_fn_t fail_fn);
94 void Restat(const std::vector<int>& fds_to_ignore, fail_fn_t fail_fn);
99 void ReopenOrDetach(fail_fn_t fail_fn);
104 void RestatInternal(std::set<int>& open_fds, fail_fn_t fail_fn);