1834142 Members
2271 Online
110064 Solutions
New Discussion

Re: Problem tty

 
My_Server
Advisor

Problem tty

Hi
please some one can help me for this message in .profile of ORACLE user in my system HP UX
this error message was in a log file for the user when he excute a script file
ttytype: couldn't open /dev/tty for reading
please how i can resolve this problem

thanks
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: Problem tty

The could occur when doing terminal operations in the .profile start up script. In particular you shouldn't do stty, tset, resize, etc.

The standard trick is for interactive shells is:

# Set up the terminal:
if [ "${-%%*i*}" != "$-" ]; then
/bin/stty hupcl ixon ixoff
# use CTRL-z for suspending a process
/bin/stty erase "^H" kill "^X" intr "^C" eof "^D" susp "^z"
fi

My_Server
Advisor

Re: Problem tty

this is what i have in .profile
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
Ivan Krastev
Honored Contributor

Re: Problem tty

If you still receive same error put it also in /etc/profile.


regards,
ivan
My_Server
Advisor

Re: Problem tty


i will replace this part from /etc/profile of user ,for this that you send me and i will try again

thanks