By default if you run crontab scripts on a HP-UX machine, you might get error messages like this:
ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
Not a terminal
The reason for these messages is that in /etc/profile (and maybe in the user's $HOME/.profile too) there're some calls to
ttytype and
stty. Both are looking for a terminal to set and in cron jobs there'll be no terminal. You can fix these warnings by surrounding the
ttytype,
stty and
tset calls (and any other command that tries to use the terminal) with a condition like this:
if `tty -s`; then
...
fi
Comments
not a typewriter
Can you tem my where ddo Y have to make this condition?
I have tried In the .profile of the user, do I also have to do the same test in the /etc/profile?
Thanks a lot for your help.
Electronick
Re: not a typewriter
/etc/profilesolved the problem, in your case it might be something else (depends on what you're running as a cron job, what shell do you use, etc.).Thank you for your
I had modified only the ~/.profile. The problem is solved.
Thanks!