Stty: 'standard input': Inappropriate ioctl for device

We are trying out v20.0.1 and when I try to run this very small script via qsub – I get the following error in STDERR (e.g. STDIN.e)

stty: ‘standard input’: Inappropriate ioctl for device
stty: ‘standard input’: Inappropriate ioctl for device

The content of the script is the following:

The output file (e.g. STDIN.o) prints out a valid output but the error file contains the 2 lines above.

the user’s shell is zsh.

Can you please help figure out what’s the issue?


Most likely, somewhere in the system or user startup scripts for zsh or bash, there is an stty command being executed when it should not be. That is, the script should execute the stty only when the shell is interactive.

For testing, add the following to your qsub command: -S /bin/bash. This will bypass running the user’s shell. If the warning messages go away, then the problem is with the zsh startup scripts. If the warnings are still there, then the problem is with bash startup.

When I have seen this in the past, the problem has been with the user’s .bashrc or .profile. The fact that it appears twice points to .bashrc, because the bash startup scripts distributed with Linux run the .bashrc twice (an error in my opinion).