mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-13 20:25:53 +08:00
[fix] resolve cross-platform build warnings
This commit is contained in:
1 parent
33bc5bf13b
commit
e3ad683809
14 files changed
+58
-39
No files matched your search
@@ -102,7 +102,11 @@ void Launch(const fs::path& executable, const std::vector<std::string>& argument
|
||||
}
|
||||
execv(executable.c_str(), argv.data());
|
||||
const int error = errno;
|
||||
(void)write(errors[1], &error, sizeof(error));
|
||||
// This small blocking pipe write is atomic. Retry signal interruptions so
|
||||
// the parent cannot mistake a failed exec for a successful launch.
|
||||
ssize_t written;
|
||||
do { written = write(errors[1], &error, sizeof(error)); }
|
||||
while (written < 0 && errno == EINTR);
|
||||
_exit(127);
|
||||
}
|
||||
close(errors[1]);
|
||||
|
||||
Reference in new issue
Block a user