[3704] in testers
8.2 solaris dm
daemon@ATHENA.MIT.EDU (John Hawkinson)
Sat Jul 4 07:50:58 1998
Date: Sat, 4 Jul 1998 07:50:49 -0400
To: testers@MIT.EDU
From: John Hawkinson <jhawk@MIT.EDU>
If /dev/console is a serial console, then when dm starts
X (on the frame buffer),
dm:could not issue ioctl: Invalid argument
periodically appears on the console.
truss doesn't seem to show ioctl() failing, though
it does show setpgid() failing [peculiar!]; it's possible
I missed the point where dm actually complains about this:
sigaction(SIGCLD, 0xEFFFF218, 0x00000000) = 0
waitid(P_ALL, 0, 0xEFFFF1B8, WEXITED|WTRAPPED|WNOHANG) = 0
fstat(3, 0xEFFFEFE0) = 0
time() = 899552514
putmsg(3, 0xEFFFE698, 0xEFFFE68C, 0) = 0
open("/etc/.syslog_door", O_RDONLY) = 6
door_info(6, 0xEFFFE5D0) = 0
getpid() = 400 [1]
door_call(6, 0xEFFFE5B8) = 0
close(6) = 0
waitid(P_ALL, 0, 0xEFFFF1B8, WEXITED|WTRAPPED|WNOHANG) = 0
setcontext(0xEFFFF390)
fstat(3, 0xEFFFF2F0) = 0
time() = 899552514
putmsg(3, 0xEFFFE9A8, 0xEFFFE99C, 0) = 0
open("/etc/.syslog_door", O_RDONLY) = 6
door_info(6, 0xEFFFE8E0) = 0
getpid() = 400 [1]
door_call(6, 0xEFFFE8C8) = 0
close(6) = 0
getpid() = 400 [1]
setpgid(0, 400) Err#1 EPERM
ioctl(0, TIOCGSID, 0xEFFFF4E4) = 0
getsid(0) = 400
ioctl(0, TIOCSPGRP, 0xEFFFF590) = 0
sigprocmask(SIG_SETMASK, 0x00030CF0, 0xEFFFF6A8) = 0
poll(0xEFFFD648, 1, -1) = 1
sigprocmask(SIG_BLOCK, 0xEFFFF6A8, 0x00000000) = 0
read(5, " f s i d : r o o t n".., 256) = 95
write(1, " f s i d : r o o t n".., 95) = 95
fstat(3, 0xEFFFF2F0) = 0
time() = 899552514
putmsg(3, 0xEFFFE9A8, 0xEFFFE99C, 0) = 0
open("/etc/.syslog_door", O_RDONLY) = 6
door_info(6, 0xEFFFE8E0) = 0
getpid() = 400 [1]
door_call(6, 0xEFFFE8C8) = 0
close(6) = 0
getpid() = 400 [1]
setpgid(0, 400) Err#1 EPERM
ioctl(0, TIOCGSID, 0xEFFFF4E4) = 0
getsid(0) = 400
Code inspection reveals:
#ifdef SOLARIS
static int grabconsole(void)
{
int console;
int p[2];
if (pipe(p) < 0) {
fprintf(stderr, "dm: could not open pipe: %s\n",strerror(errno));
exit(1);
}
if ((console = open("/dev/console", O_RDONLY)) < 0 ) {
fprintf(stderr, "dm:could not open /dev/console: %s\n",
strerror(errno));
exit(1);
}
if (ioctl(console, SRIOCSREDIR, p[1]) < 0) {
fprintf(stderr, "dm:could not issue ioctl: %s\n",strerror(errno));
exit(1);
}
return(p[0]);
}
#endif
It sure seems like there ought to be a better way to do this.
I suppose dm isn't designed to work properly with serial consoles
or somesuch. If so, perhaps it should supress the error :-)
I dunno.
--jhawk