Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550176 - app-admin/restart_services: stty: standard input: Inappropriate ioctl for device
Summary: app-admin/restart_services: stty: standard input: Inappropriate ioctl for device
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 14:25 UTC by Robin Lutz
Modified: 2015-12-07 02:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Lutz 2015-05-22 14:25:28 UTC
I run 

  restart_services -l --no-color

as a cron job at night using vixie-cron.

Problem is, that somehow in the vixie-cron environment the command

  stty icanon echo echok

in the function clean_exit() results in the output

stty: standard input: Inappropriate ioctl for device

I am not 100% sure, what this command does (I guess it cleans the terminal in case something goes wrong with coloring).

I am using the newest version of restart_services in portage (0.11.0) and '/bin/bash' as the vixie-cron shell.
Comment 1 Robin Lutz 2015-05-22 14:28:07 UTC
Does this make sense? It's a check, whether the shell is interactive.

function clean_exit() {
    case $- in
        *i*) stty icanon echo echok ;;
    esac
}
Comment 2 Marc Schiffbauer gentoo-dev 2015-08-03 13:16:44 UTC
Sorry for the delay and  many thanks for your report. I will have a look soon.
Comment 3 Marc Schiffbauer gentoo-dev 2015-08-19 21:50:38 UTC
Fixed upstream. Please reopen if new version 0.12.0 does not solve it for you. And thanks again for reporting!
Comment 4 Robin Lutz 2015-11-13 10:14:31 UTC
I recently updated to the latest version 0.13.0-r1 (which of course overwrites my changes) and the errors are back again. Your solution somehow does not work for execution through vixie-cron.
Comment 5 Marc Schiffbauer gentoo-dev 2015-12-07 02:03:03 UTC
Should be fixed in 0.13.1, at least with my cronie I could reproduce it and now its fixed. Thanks for using restart_services ;)