"tcsetattr(): Inappropriate ioctl for device" (redirection to /dev/null)
Nils Kassube
kassube at gmx.net
Tue Apr 7 14:02:01 UTC 2015
Adam Funk wrote:
> I have a cron job to run a bash script that includes the following
> line:
>
> hpodder >/dev/null
>
> Note that I'm not redirecting stderr. Whenever the hpodder command
> gives an error message, the cron job output also includes
> "tcsetattr(): Inappropriate ioctl for device". I've googled this
> message & it usually seems related to redirecting output when changing
> ownership/permissions, e.g., with su -c or sudo. In my case, the
> crontab is running in the 'adam' account, & the bash script is owned
> by 'adam' too.
The tcsetattr function is usually used for some sort of terminal device.
Maybe that script wants to change the terminal settings of /dev/null
which wouldn't make sense. What happens if you try the command from the
command line instead of the cron job? Do you also get the error message?
And what is the purpose of the script?
Nils
More information about the ubuntu-users
mailing list