[erlang-questions] run_erl / Erlang configure script broken?

Sean McEvoy sean.mcevoy@REDACTED
Fri Aug 28 15:25:25 CEST 2009

Hi Chandru,

How are you doing?

I'm not sure I can help you here but I can show you all I did trying to fix this.

I added some C code to run_erl.c, an include directory:
#include <sys/stropts.h>

and some extra code in the open_pty_master function, at line 975:
static int open_pty_master(char **ptyslave)


    int fds;
    mfd = open("/dev/ptmx", O_RDWR);  /* open master */
    grantpt(mfd);                     /* change permission of   slave */
    unlockpt(mfd);                    /* unlock slave */
    ptyslave = ptsname(mfd);          /* get name of slave */
    fds = open(ptyslave, O_RDWR);     /* open slave */
    ioctl(fds, I_PUSH, "ptem");       /* push ptem */
    ioctl(fds, I_PUSH, "ldterm");     /* push ldterm*/
    return mfd;

#endif /* !HAVE_OPENPTY */
  return -1;

This managed to open the PTY Master but not the slave, I think it's almost there but not working yet. It's the first time in 10 years I wrote C code so it might just be something simple missing.

We needed this a solution quickly so a colleague took responsibility to start our node using a different method, not using run_erl.

Your problem is one of permissions so I guess this might not be much use.


----- Original Message -----
From: "Chandru" <chandrashekhar.mullaparthi@REDACTED>
To: "Sean McEvoy" <sean.mcevoy@REDACTED>
Cc: "erlang-questions Questions" <erlang-questions@REDACTED>, "Mietek Bąk" <mietek.bak@REDACTED>
Sent: Friday, 28 August, 2009 12:24:28 GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: [erlang-questions] run_erl / Erlang configure script broken?

2009/8/20 Sean McEvoy < sean.mcevoy@REDACTED > 

Hello List, 

We're running R13B01 on a Solaris 10 machine (10/08 s10x_u6wos_07b X86, at a customer's site, configured in a non-standard way). 
When trying to use run_erl we see the error: 
run_erl:351 [13847] Wed Aug 19 13:34:15 2009 
errno=2 'No such file or directory' 
Could not open pty master 

Sorry Sean, I don't have a fix. I have the same problem! We are trying to install multiple erlang nodes on a blade server which has been divided into Solaris zones. Apparently, in such an env, /dev/pty/ poses a security risk and has been disabled by our sysadmins. Help please! 


More information about the erlang-questions mailing list