This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feature/try fix top native crash fd problem #2854
Merged
lucky-chen
merged 4 commits into
apache:master
from
Darin726:feature/try-fix-top-native-crash-fd-problem
Aug 28, 2019
Merged
Feature/try fix top native crash fd problem #2854
lucky-chen
merged 4 commits into
apache:master
from
Darin726:feature/try-fix-top-native-crash-fd-problem
Aug 28, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Darin726
commented
Aug 28, 2019
- 全局的 fd 操作改成局部变量, 每次初始化互不干扰
- mmap 返回 9 或 13 再次尝试创建一次 fd.
- 创建 fd 的操作放在各自的线程.
- 创建 fd 时加上进程号, 各进程采用不同的名字. 做好隔离.
所有的 fd 操作都控制在局部变量. 去掉所有的静态变量. 防止全局污染
|
lucky-chen
reviewed
Aug 28, 2019
|
||
void *WeexConnInfo::mmap_for_ipc() { | ||
pid_t pid = getpid(); | ||
std::string clientName(this->is_client ? "WEEX_IPC_CLIENT" : "WEEX_IPC_SERVER"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"clientName" is confusing, Actually it means “client/server” mmap name。
jianhan-he
reviewed
Aug 28, 2019
if (this->is_client) { | ||
throw IPCException("failed to create ashmem region: %s", strerror(errno)); | ||
} else { | ||
LOGE("failed to create ashmem region: %s", strerror(errno)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add return base
lucky-chen
approved these changes
Aug 28, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.