pg problem under ksh
Kevin P. Kleinfelter
kevin at msa3b.UUCP
Mon Oct 23 02:47:58 AEST 1989
johnny at edvvie.at (Johann Schweigl) writes:
>From article <1156 at msa3b.UUCP>, by kevin at msa3b.UUCP (Kevin P. Kleinfelter):
>> ksh and get a prompt. Then I type
>> pg foo
>> and I get
>> pg: cannot reopen stdout
>>
>Under AIX PS/2 ksh is running fine, just compile with all the BSD defines.
The "88b" version of ksh sources, now distributed by the toolchest,
self-configures. This means I cannot just tell it that I am "BSD" or "SYSV".
The source of this problem is that the ksh configure decides that
"setpgrp" should be used to create a process group, and creates a #define
to do this. Since setpgrp loses /dev/tty, one must "#define" this to
"setpgid(0,0)". This brings me to the following list of changes necessary
to make the "88b" version of ksh sources work properly on AIX PS/2 V1.1:
1) Change #define in include/sh_config to #define setpgrp to setpgid(0,0).
2) Edit "include/io.h" to remove "#undef O_NDELAY" and edit
"sh/io.c" to change "#ifdef O_NDELAY" to "#ifndef FNDELAY". The problem
here is that ksh #undefs O_NDELAY, but later uses FNDELAY, and in AIX
FNDELAY is #defined using O_NDELAY.
3) "#undef dirent" before "#include sys/dir.h" in "sh/expand.c" because
dir.h defines dirent too (so you get 2 definitions of dirent).
4) Edit "install/config" to echo "#undef SIG_NORESTART". The configure
process decides that AIX does not restart I/O to the tty on interrupts.
It is wrong, it does.
I post this because several other people have indicated trouble in porting
ksh to AIX. These comments probably apply only to 88b ksh and to AIX PS/2
V1.1. With these changes it seems to work pretty well, although I have
only tested the features that I use. Lotsa luck to other porters. I have
an email address for David Korn, and after I use ksh a little longer, I
will email these problems to him, so perhaps ksh will work better with AIX
in the future.
--
Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347
gatech!nanovx!msa3b!kevin
More information about the Comp.unix.aix
mailing list