Can't use Expect in a portfile

Ryan Schmidt ryandesign at macports.org
Fri Apr 20 14:52:28 UTC 2018


On Apr 19, 2018, at 07:19, Rainer Müller wrote:

> On 2018-04-19 13:58, Ryan Schmidt wrote:
>> 
>> On Apr 19, 2018, at 06:49, Rainer Müller wrote:
>> 
>>> On 2018-04-19 13:31, Ryan Schmidt wrote:
>>>> I can't seem to use Expect in a portfile. [...]
>>>> 
>>>> The system has no more ptys.  Ask your system administrator to create more.
>>> 
>>> This is probably due to sandboxing. I guess Expect wants to open some
>>> device such as /dev/ptmx read/write, but is not allowed to do so.
>> 
>> Maybe. The error message is printed when exp_getptymaster() (in pty_unicos.c) returns -1. It's hard to follow exactly what that function does. It has a log of diagnostic log lines (expDiagLog(...)) but I can't figure out how to get Expect to print those diagnostics.
>> 
>> I could try adding some paths to the sandbox whitelist.
> 
> You can check in Console.app for sandbox violations.

Thanks. This fixes it for me:

https://github.com/macports/macports-base/pull/81

Is that safe to commit?


> Or run this command in another terminal window parallel to the port process:
> 
> $ log stream --predicate '(process == "sandboxd")' --level error



More information about the macports-dev mailing list