"tcsetattr(): Inappropriate ioctl for device" (redirection to /dev/null)

Adam Funk a24061 at ducksburg.com
Wed Apr 22 14:35:43 UTC 2015


On 2015-04-07, Nils Kassube wrote:

> 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?

It runs hpodder, which is an obsolete command-line podcast-fetching
program (I've been looking for a replacement, but I couldn't get
podget to work) properly.  The cron job runs it in the morning before
I get to the office.

The strange thing is that one of my hard drives died recently (the /
one, not the /home one) so I had to reinstall the OS (and the obsolete
deb for hpodder), but I didn't need to change the script or the
hpodder database (which were still intact in my home directory).  This
ioctl warning has only appeared since the reinstallation.





More information about the ubuntu-users mailing list