No subshell in Rational ClearCase environment



Hello,

I found the following error at work recently:

System is:
Linux bunox016 2.4.18-19.7.xsmp #1 SMP Thu Dec 12 07:56:58 EST 2002 i686 unknown

$ mc -V
GNU Midnight Commander 4.6.0
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish, undelfs
With builtin Editor
Using system-installed S-Lang library with terminfo database
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support

We use Rational Clearcase for concurrent version management. This tool uses so-called views that can be 
defined in text files and started with a command. When a view is started, the tool opens a new shell. If I 
start mc in this new shell, I have no subshell. mc prints the following error message:

subshell.c: couldn't open master side of pty
pty_open_master: Exec format error

I found out that it is the grantpt(pty_master) call in pty_open_master that sets the NOEXEC error code. 
According to its documentation, it shouldn't, but it is probably the internal fork/exec who does it.

I couldn't go any further with my investigations. Could anyone help?
A (hopefully relevatn) snippet from the strace output:

open("/usr/share/terminfo/x/xterm", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=1773, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
read(5, "\32\1\34\0\35\0\17\0i\1\267\3xterm|X11 terminal e"..., 4096) = 1773
close(5)                                = 0
munmap(0x40014000, 4096)                = 0
ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 -opost isig -icanon -echo ...}) = 0
open("/dev/ptmx", O_RDWR)               = 5
statfs("/dev/pts", {f_type=0x7366766d, f_bsize=1024, f_blocks=507732, f_bfree=344426, f_files=131072, 
f_ffree=108903, f_namelen=255}) = 0
statfs("/dev/", {f_type=0x7366766d, f_bsize=1024, f_blocks=507732, f_bfree=344426, f_files=131072, 
f_ffree=108903, f_namelen=255}) = 0
close(5)                                = 0
open("/dev/ptyp0", O_RDWR)              = 5
ioctl(5, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [134674747])         = -1 EINVAL (Invalid argument)
fstat64(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 0), ...}) = 0
stat64("/dev/ttyp0", {st_mode=S_IFCHR|0666, st_rdev=makedev(3, 0), ...}) = 0
statfs("/dev/ttyp0", {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=507732, f_bfree=344426, 
f_files=131072, f_ffree=108903, f_namelen=255}) = 0
ioctl(5, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TIOCGPTN, [0])                 = -1 EINVAL (Invalid argument)
fstat64(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(2, 0), ...}) = 0
stat64("/dev/ttyp0", {st_mode=S_IFCHR|0666, st_rdev=makedev(3, 0), ...}) = 0
stat64("/dev/ttyp0", {st_mode=S_IFCHR|0666, st_rdev=makedev(3, 0), ...}) = 0
getuid32()                              = 10186992
chown32(0xbfffd460, 0x9b70f0, 0x5)      = -1 EPERM (Operation not permitted)
fork()                                  = 22113
wait4(22113, [WIFEXITED(s) && WEXITSTATUS(s) == 4], 0, NULL) = 22113
--- SIGCHLD (Child exited) ---
wait4(1, 0xbfffd09c, WNOHANG|WUNTRACED, NULL) = -1 ECHILD (No child processes)
wait4(22112, 0xbfffd09c, WNOHANG|WUNTRACED, NULL) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [RTMIN])
close(5)                                = 0
write(2, "subshell.c: couldn\'t open master"..., 45subshell.c: couldn't open master side of pty
) = 45
write(2, "pty_open_master: Exec format err"..., 35pty_open_master: Exec format error
) = 35

Before I forget: the subshell starts correctly if the clearcase environment is not set.

Thanks for any help,

Elek









[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]