Bug 22479 - hang on startup on HP/UX
Summary: hang on startup on HP/UX
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources HP-UX
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-15 20:03 UTC by Roy Dragseth
Modified: 2004-05-18 10:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Dragseth 2001-03-15 20:01:26 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           KDE 2.1.0 
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.2
OS:                HP/UX
OS/Compiler notes: Not Specified

Konsole never get to the prompt it is hanging in a call to tcgetattr from TEPty:makePty.  Here is a backtrace:

(gdb) bt
#0  0xc013f6f0 in _ioctl_sys ()
#1  0xc0148eb0 in ioctl ()
#2  0xc00b35bc in tcgetattr ()
#3  0xc42bdd60 in TEPty::makePty (this=warning: reading register r5: I/O error
0x0 dev=0x40068246 "/dev/pts/20"
    pgm=0x4003a2b8 "/store/bin/tcsh" args=@0x40068194
    term=0x40068348 "xterm" addutmp=0) at TEPty.C:537
#4  0xc42be300 in TEPty::commSetupDoneC (this=0x40068170) at TEPty.C:612
#5  0xc318ad34 in KProcess::start (this=0x40068170 runmode=NotifyOnExit
    comm=10) at kprocess.cpp:215
#6  0xc42bd29c in TEPty::run (this=0x40068170
    _pgm=0x7b03a26a "/store/bin/tcsh" _args=@0x4006813c
    _term=0x40068348 "xterm" _addutmp=0) at TEPty.C:269
#7  0xc42c8374 in TESession::run (this=0x40068170) at session.C:51
#8  0xc2969a34 in QObject::activate_signal ()
#9  0xc29dff78 in QSignal::activate ()
#10 0xc29f2080 in QSingleShotTimer::event ()
#11 0xc288f504 in QApplication::notify ()
Cannot access memory at address 0x0.

There is an oddity with the initialization of the pty the call to grantpt in TEPty:openPty is successful but doesn't change the ownership of the pty:

47 royd@joseph:~/src/kde2/kdebase-2.1/konsole/> ll /dev/pts/20
crw--w----   1 royd       staff      157 0x000014 Mar 15 09:03 /dev/pts/20 

According to the documentation the gid should be changed to tty by grantpt.  The documentation has a warning about possible problems if the caller has installed a custom signal handler trapping SIGCHLD but I've been experimenting with this with no success.

I also tried to hack the code to enable the use of the konsole_grantpty but that doesn't work either.

Regards
r.



(Submitted via bugs.kde.org)
Comment 1 Roy Dragseth 2001-05-08 07:33:55 UTC
I finally found the time to track down this one.  It seems to be a
problem with grantpt() on hpux. I'm not 100% sure but just comment
out the HAVE_GRANTPT definition in config.h after running configure
and everything should be hunky dory...

Best regards
Roy.

-- 

  The Computer Center University of Tromsø N-9037 TROMSà Norway.
      phone:+47 77 64 41 07 fax:+47 77 64 41 00
     Roy Dragseth High Perfomance Computing System Administrator
 Direct call: +47 77 64 62 56. email: royd@cc.uit.no
Comment 2 thebeast 2003-01-19 06:28:51 UTC
I vote for marking INVALID, if this isn
Comment 3 mcamen 2003-03-09 17:14:19 UTC
With KDE 3.1 konsole still does not work on HPUX. Konsole starts fine but shows 
just an empty window without any prompt. 
Comment 4 Roy Dragseth 2004-05-18 10:42:19 UTC
I consider the grantpty hack of config.h mentioned above to be an appropriate workaround.

Let us just close this one, there aren't many left using hpux on the desktop anyway.  I switched to linux years ago...


r.