Set the flag O_CLOEXEC on all file handles so they don't interferes with the execution of scripts. See #100
This commit is contained in:
parent
3441b9cc45
commit
2cb1a2ac97
3 changed files with 22 additions and 10 deletions
|
@ -57,7 +57,7 @@ void Socket::connect(const std::wstring &server) {
|
|||
struct sockaddr_un remote;
|
||||
socklen_t len;
|
||||
|
||||
if ((d->socket = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
|
||||
if ((d->socket = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1) {
|
||||
return;
|
||||
}
|
||||
std::string name = "/tmp/" + std::string(server.begin(), server.end());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue