|
Gérard Milmeister |
928fb3 |
--- otp_src_R10B-10/erts/etc/unix/run_erl.c.bak 2006-05-03 15:54:19.000000000 +0200
|
|
Gérard Milmeister |
928fb3 |
+++ otp_src_R10B-10/erts/etc/unix/run_erl.c 2006-05-03 15:57:36.000000000 +0200
|
|
Gérard Milmeister |
928fb3 |
@@ -42,6 +42,8 @@
|
|
Gérard Milmeister |
928fb3 |
#include <dirent.h>
|
|
Gérard Milmeister |
928fb3 |
#include <termios.h>
|
|
Gérard Milmeister |
928fb3 |
#include <time.h>
|
|
Gérard Milmeister |
928fb3 |
+#include <pty.h>
|
|
Gérard Milmeister |
928fb3 |
+#include <utmp.h>
|
|
Gérard Milmeister |
928fb3 |
#if !defined(NO_SYSLOG)
|
|
Gérard Milmeister |
928fb3 |
#include <syslog.h>
|
|
Gérard Milmeister |
928fb3 |
#endif
|
|
Gérard Milmeister |
928fb3 |
@@ -803,6 +805,7 @@
|
|
Gérard Milmeister |
928fb3 |
static int open_pty_master(char **ptyslave)
|
|
Gérard Milmeister |
928fb3 |
{
|
|
Gérard Milmeister |
928fb3 |
int mfd;
|
|
Gérard Milmeister |
928fb3 |
+ int sfd;
|
|
Gérard Milmeister |
928fb3 |
char *major, *minor;
|
|
Gérard Milmeister |
928fb3 |
|
|
Gérard Milmeister |
928fb3 |
static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE";
|
|
Gérard Milmeister |
928fb3 |
@@ -818,6 +821,15 @@
|
|
Gérard Milmeister |
928fb3 |
/* http://www.xcf.berkeley.edu/~ali/K0D/UNIX/PTY/code/upty.h.html */
|
|
Gérard Milmeister |
928fb3 |
|
|
Gérard Milmeister |
928fb3 |
{
|
|
Gérard Milmeister |
928fb3 |
+ static char ttyname[] = " ";
|
|
Gérard Milmeister |
928fb3 |
+ if (0 == openpty(&mfd, &sfd, ttyname, NULL, NULL)) {
|
|
Gérard Milmeister |
928fb3 |
+ close(sfd);
|
|
Gérard Milmeister |
928fb3 |
+ *ptyslave = ttyname;
|
|
Gérard Milmeister |
928fb3 |
+ return mfd;
|
|
Gérard Milmeister |
928fb3 |
+ }
|
|
Gérard Milmeister |
928fb3 |
+ }
|
|
Gérard Milmeister |
928fb3 |
+
|
|
Gérard Milmeister |
928fb3 |
+ {
|
|
Gérard Milmeister |
928fb3 |
/* New style devpts or devfs /dev/pty/{m,s}{0,1....} */
|
|
Gérard Milmeister |
928fb3 |
|
|
Gérard Milmeister |
928fb3 |
static char ptyname[] = "/dev/pty/mX";
|
|
Gérard Milmeister |
928fb3 |
--- otp_src_R10B-10/erts/etc/common/Makefile.in.orig 2006-05-03 17:08:53.000000000 +0200
|
|
Gérard Milmeister |
928fb3 |
+++ otp_src_R10B-10/erts/etc/common/Makefile.in 2006-05-03 17:10:18.000000000 +0200
|
|
Gérard Milmeister |
928fb3 |
@@ -241,7 +241,7 @@
|
|
Gérard Milmeister |
928fb3 |
$(PURIFY) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/inet_gethost.o $(ENTRY_OBJ) $(LIBS)
|
|
Gérard Milmeister |
928fb3 |
|
|
Gérard Milmeister |
928fb3 |
$(BINDIR)/run_erl: $(OBJDIR)/run_erl.o
|
|
Gérard Milmeister |
928fb3 |
- $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/run_erl.o
|
|
Gérard Milmeister |
928fb3 |
+ $(LD) $(LDFLAGS) -lutil -o $@ $(OBJDIR)/run_erl.o
|
|
Gérard Milmeister |
928fb3 |
|
|
Gérard Milmeister |
928fb3 |
$(OBJDIR)/run_erl.o: ../unix/run_erl.c
|
|
Gérard Milmeister |
928fb3 |
$(CC) $(CFLAGS) -o $@ -c ../unix/run_erl.c
|