After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 304815 - pty descriptor passing broken on Solaris
pty descriptor passing broken on Solaris
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Solaris
: High normal
: ---
Assigned To: VTE Maintainers
Nalin Dahyabhai
Depends on:
Blocks:
 
 
Reported: 2005-05-19 22:15 UTC by Robert Basch
Modified: 2005-08-12 14:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Add correct test for recvmsg() to top-level configure.in (1.37 KB, patch)
2005-05-19 22:28 UTC, Robert Basch
none Details | Review

Description Robert Basch 2005-05-19 22:15:35 UTC
Distribution/Version: 10

We are running vte 0.11.11 on Solaris 10.  When a gnome-terminal is started,
two ptys are apparently allocated -- one is the actual controlling terminal
for the shell process, while another is recorded in the corresponding utmp
record.  It seems that the problem is in the build system -- gnome-pty-helper
is configured to use sendmsg() to pass the pty descriptors to the vte client,
but the client code (in src/pty.c) is not configured to use recvmsg().  The
client falls back to allocating a pty itself.

The problem can be fixed by correcting the autoconf test for recvmsg(), which
is found in the socket library on Solaris.  (gnome-pty-helper already has
a proper test for sendmsg()).  The following patch (against our local cvs
repository) to the top-level configure.in (and regenerating configure) fixes
the problem.

Index: configure.in
===================================================================
RCS file: /afs/dev.mit.edu/source/repository/third/vte/configure.in,v
retrieving revision 1.4
diff -u -r1.4 configure.in
--- configure.in        22 Dec 2004 17:27:27 -0000      1.4
+++ configure.in        19 May 2005 21:48:36 -0000
@@ -225,17 +225,21 @@
 AC_HEADER_TIOCGWINSZ
 
 # Check for PTY handling functions.
-AC_CHECK_FUNCS(cfmakeraw getpgid getpt grantpt unlockpt ptsname ptsname_r recvmsg)
+AC_CHECK_FUNCS(cfmakeraw getpgid getpt grantpt unlockpt ptsname ptsname_r)
 
 # Pull in the right libraries for various functions which might not be
 # bundled into an exploded libc.
 AC_CHECK_FUNC(socket,[have_socket=1],AC_CHECK_LIB(socket,socket,[have_socket=1;
LIBS="$LIBS -lsocket"]))
 AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1;
LIBS="$LIBS -lsocket"]))
+AC_CHECK_FUNC(recvmsg,[have_recvmsg=1],AC_CHECK_LIB(socket,recvmsg,[have_recvmsg=1;
LIBS="$LIBS -lsocket -lnsl"]))
 if test x$have_socket = x1 ; then
        AC_DEFINE(HAVE_SOCKET,1,[Define if you have the socket function.])
 fi
 if test x$have_socketpair = x1 ; then
        AC_DEFINE(HAVE_SOCKETPAIR,1,[Define if you have the socketpair function.])
+fi
+if test x$have_recvmsg = x1 ; then
+       AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.])
 fi
 AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
Comment 1 Olav Vitters 2005-05-19 22:25:12 UTC
Please attach the patch so it can be tracked.
Comment 2 Robert Basch 2005-05-19 22:28:51 UTC
Created attachment 46664 [details] [review]
Add correct test for recvmsg() to top-level configure.in

Attaching the patch...
Comment 3 Michele Baldessari 2005-07-29 21:12:29 UTC
Hi,

I think this should go in post gnome-2.12.. it also might be related to 122505

thanks for reporting
Comment 4 Kjartan Maraas 2005-08-12 14:34:51 UTC
Commited.