[uClibc]Job Control on /dev/console
Andrew May
acmay at acmay.homeip.net
Wed Nov 27 20:02:20 UTC 2002
On Wed, Nov 27, 2002 at 11:53:23AM -0700, Erik Andersen wrote:
> On Wed Nov 27, 2002 at 10:33:11AM -0800, Andrew May wrote:
> > I get the "job control turned off" print when I start a shell on /dev/console,
> > on my PPC405 system.
> >
> > The tty command returns /dev/console. I don't know how to set inittab to spawn
> > off a getty for /dev/console, so I just spawn off a shell.
>
> Job control is turned off since you cannot get a controlling
> terminal on /dev/console. The kernel will not allow it. Run
> your shell on a normal tty such as ttyS0 or tty1 and you will be
> fine. Or you can hack your kernel if you are into that sortof
> thing.
>
> http://lists.linuxppc.org/linuxppc-dev/200201/msg00287.html
Well I am using devfs, and have a link for ttyS[01] to tts/[01], but
I can't get getty to work on either of the serial ports.
Here is an strace, /dev/console and /dev/ttyS[01] all seem to fail
the same ioctl.
-------------- next part --------------
/dev # strace getty 9600 ttyS1
execve("/sbin/getty", ["getty", "9600", "ttyS1"], [/* 7 vars */]) = 0
ioctl(0, 0x402c7413, 0x7ffffd38) = 0
ioctl(1, 0x402c7413, 0x7ffffd38) = 0
getuid() = 0
setuid(0) = 0
getgid() = 0
setgid(0) = 0
setsid() = 123
getpid() = 123
brk(0) = 0x1003b40c
brk(0x1003e40c) = 0x1003e40c
brk(0x1003f000) = 0x1003f000
brk(0x10040000) = 0x10040000
open("/var/run/utmp", O_RDWR) = -1 ENOENT (No such file or directory)
open("/var/run/utmp", O_RDONLY) = -1 ENOENT (No such file or directory)
close(-1) = -1 EBADF (Bad file descriptor)
open("/var/run/utmp", O_RDWR) = -1 ENOENT (No such file or directory)
open("/var/run/utmp", O_RDONLY) = -1 ENOENT (No such file or directory)
close(-1) = -1 EBADF (Bad file descriptor)
time([417]) = 417
lseek(-1, -384, SEEK_CUR) = -1 EBADF (Bad file descriptor)
open("/var/run/utmp", O_RDWR) = -1 ENOENT (No such file or directory)
open("/var/run/utmp", O_RDONLY) = -1 ENOENT (No such file or directory)
close(-1) = -1 EBADF (Bad file descriptor)
lseek(-1, 0, SEEK_END) = -1 EBADF (Bad file descriptor)
write(-1, "\0\6\0\0\0\0\0{ttyS1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = -1 EBADF (Bad file descriptor)
open("/var/log/wtmp", O_WRONLY|O_APPEND) = -1 ENOENT (No such file or directory)close(1) = 0
close(2) = 0
chdir("/dev") = 0
stat("ttyS1", {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 65), ...}) = 0
close(0) = 0
open("ttyS1", O_RDWR|O_NONBLOCK) = 0
dup(0) = 1
dup(0) = 2
ioctl(0, 0x403c7413, 0x7ffffd78) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGPIPE, {0x10009afc, [], 0}, {SIG_DFL}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0) = 4
connect(4, {sin_family=AF_UNIX, path="/dev/log"}, 10) = 0
time([417]) = 417
open("/etc/TZ", O_RDONLY) = 5
read(5, "UTC0\n", 68) = 5
read(5, "", 63) = 0
close(5) = 0
getpid() = 123
write(4, "<35>Jan 1 00:06:57 getty[123]: "..., 63) = 63
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
close(4) = 0
nanosleep({10, 0}, {10, 0}) = 0
exit(1) = ?
More information about the uClibc
mailing list