Merge pull request #3547 from nlewo/grantpt

Only call grantpt on MacOS systems
This commit is contained in:
Eelco Dolstra 2020-04-29 16:04:35 +02:00 committed by GitHub
commit aeb406dd1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2250,10 +2250,13 @@ void DerivationGoal::startBuilder()
if (chown(slaveName.c_str(), buildUser->getUID(), 0)) if (chown(slaveName.c_str(), buildUser->getUID(), 0))
throw SysError("changing owner of pseudoterminal slave"); throw SysError("changing owner of pseudoterminal slave");
} else { }
#if __APPLE__
else {
if (grantpt(builderOut.readSide.get())) if (grantpt(builderOut.readSide.get()))
throw SysError("granting access to pseudoterminal slave"); throw SysError("granting access to pseudoterminal slave");
} }
#endif
#if 0 #if 0
// Mount the pt in the sandbox so that the "tty" command works. // Mount the pt in the sandbox so that the "tty" command works.