Sample Header Ad - 728x90

bash: no job control in this shell

10 votes
2 answers
16018 views
I have a minimal Linux system. init is /bin/bash, only bare minimum of libraries in /lib/, /dev/ is populated statically, no daemons running (no udev, ..) When bash starts, I get following error: bash: cannot set terminal process group (-1) inappropriate ioctl for device bash: no job control in this shell When I start bash with strace, I get following output: rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or address) ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 .... readlink("/proc/self/fd/0", "/dev/console"..., 4095) = 12 stat("/dev/console", {st_mode=S_IFCHR|0600, st_rdev=makedev(5, 1), ...}) = 0 open("/dev/console", O_RDWR|O_NONBLOCK) = 3 It looks, as if bash cannot open /dev/tty. But /dev/tty exists in /dev/ and has correct permissions: ll /dev/tty* crw-rw-rwT 1 root root 5, 0 2014-Sep-29 23:39:47 dev/tty crw------T 1 root root 4, 0 2015-Dec-23 20:10:18 dev/tty0 crw------T 1 root root 4, 1 2015-Dec-23 20:10:18 dev/tty1 Why cannot bash open /dev/tty? And what does the ENXIO error mean ?
Asked by Martin Vegter (598 rep)
Dec 23, 2015, 07:13 PM
Last activity: Jan 24, 2024, 07:57 PM