Below are some of the known issues/work for ksh93 that are/were
under discussion.  Roland and I will be discussing these issues further 
with our PSARC sponsor, Don Cragun, tomorrow.

        April
        
1. Built-ins bound to /usr/ast/bin

   All 30 of the libcmd built-ins will be bound to /usr/ast/bin.
   Currently /usr/ast/bin and its corresponding executable
   file need to exist for such built-ins to be invoked.

   Roland has let me know this is a just a bug to be fixed.
   The invocation of /usr/ast/bin built-ins should not
   require /usr/ast/bin.  Note that this would work
   differently than the built-ins bound to /bin (see #3),
   which will require the existence of the corresponding
   executable in /bin.

2. Moving ksh93 to the root filesystem.

   Since ksh93 is being proposed as a hardlink to /usr/lib/isaexec, 
   to allow execution of 64-bit ksh93 by default on 64-bit systems,
   moving ksh93 to the root filesystem would entail moving isaexec to 
   the root filesystem as well, affecting any other file which links 
   to isaexec.  Although isaexec is probably only used by files in 
   the ON consolidation, there is also a technical
   difficulty in that if symlinking from /usr/bin/ksh93 to /lib/isaexec,
   isaexec will look for an ISA-specific file 
   named "isaexec" under /lib.  This must be a symlink because
   hardlinking across filesystems is not allowed.

   Possible solutions:

   a) Have only the 32-bit ksh93 binary available on the root 
      filesystem; no isaexec required on root.

   /usr/bin/ksh93 hardlinks to /usr/lib/isaexec
        which will execute either the 32-bit or 64-bit ksh93
        under /usr/bin/<isa>
   /usr/bin/{sparcv7,i86}/ksh93 symlinks to the 32-bit /sbin/ksh93 binary
   /usr/bin/{sparcv9,amd64}/ksh93 is the 64-bit ksh93 binary
   /sbin/ksh93 is the 32-bit ksh93 binary

   Thus those who wish to use ksh93 exclusively on the root filesystem
   can invoke the 32-bit binary /sbin/ksh93, without using isaexec.

   Pro:  Only one copy of isaexec needed

   Con: Inconsistent locations for 32-bit and 64-bit ksh93; 
   scripts invoking /sbin/ksh93 may expect it to work the same as 
   /usr/bin/ksh93 but not get the expected 64-bit memory and address 
   space.

   b) Two copies of isaexec:  in /usr/lib (the current location)
   and /lib (on the root filesystem).

   Pro: Consistent ksh93 location; possible usage of /lib/isaexec by 
   other applications.
   Con: Two copies of isaexec


3. Built-ins 

   New ksh93 built-ins, replicating functionality in /usr/bin 
   sleep
   printf

   The current set of built-ins to be bound to /bin are: 
   cat
   chown
   head
   mkdir
   rmdir
   tee
   uniq
   wc

   Note that chmod has been removed from the /bin list,
   since there is known Solaris functionality (the recent ACL work) 
   that is not in AT&T chmod, and the outbound review is not 
   yet approved to contribute Solaris code to AT&T.
   sleep has also been removed from the /bin list, since it is 
   already a regular built-in in ksh93, not bound to a pathname.

   If in ksh93, the built-in is invoked by default instead of the 
   Solaris utility, the ksh93 built-in needs to be compatible to the
   Solaris utility behavior.  This could be true for any users with /bin
   on their path.  ksh93 users should not have to call
   the full pathname to the Solaris-compatible behavior.

   Some differences in behavior, compared with
   the Solaris /usr/bin utility, were seen for the
   ksh93 built-ins for mkdir, uniq, and printf.   The below
   cases are similar to those executed in the VSC standards
   conformance test.

   I'm assuming that these are considered bugs and will be fixed.
   
   Details:
   a) uniq
   When using the -f and -s options together, uniq should skip
   the given number of fields, immediately followed by the given 
   number of chars, before comparing adjacent lines for matching
   lines.  A field is defined by the maximumal
   string matched by the basic regular expression
   [[:blank:]]*[^[:blank:]]* 
   (zero or more blanks followed by zero or more non-blanks)

   Example:
   If input1 file contains:
   field1 field2 field3 abcd
   field1 field2 field3 abce
   abc

   uniq -f 3 -s 4 input1
        should output
   field1 field2 field3 abcd

   Using the ksh93 built-in uniq:
   uniq -f 3 -s 4 input
        outputs
   field1 field2 field3 abcd

   AT&T uniq skips the first three fields
   "field1 field2 field3", then apparently starts skipping 
   characters starting at the next non-blank character,
   "abcd", instead of at the space character following field3,
   " abcd".

   b) printf
   printf "<format>" "'<char>" does not work the same as Solaris ksh
   when <format> is one of these formats: %e, %E, %f, %g, %G.
   It is expected that a single quote followed by a character will
   output the numerical codeset (ASCII value) of the character.
   ksh93 printf works the same as Solaris ksh if <format> is %d, %i, %o, %u, 
   %x, %X.

   Example:
   printf "%f" "'-"
   should print out the floating point number for the
   ASCII value of the character which follows the single
   quote.  The numeric value of the dash (-) character is 45,
   so 45.000000 is expected.
   It is expected that the above should output the same value as
   printf "%f" "45"

   In ksh93, printf built-in outputs an error and prints the equivalent of 0:

   printf "%f" "'-"
   printf: '-: invalid character constant
   printf: warning: invalid argument of type f
   0.0000000

  c) mkdir

   From Solaris mkdir(1) manpage:
   DESCRIPTION
        The mkdir command creates the named directories in mode  777
        (possibly altered by the file mode creation mask umask(1)).
   ...

   OPTIONS
   ...

     -p              With  this  option,  mkdir  creates  dir  by
                     creating  all the non-existing parent direc-
                     tories first. The mode given to intermediate
                     directories  will  be the difference between
                     777 and the bits set in the file mode  crea-
                     tion  mask. The difference, however, must be
                     at least 300 (write and  execute  permission
                     for the user).

   therefore, with umask 202, mkdir -p a/b/c
   should create file modes for intermediate parent dirs 
   a and a/b of 777 less 202 permissions plus 300 permissions, that is:
   rwxrwxr-x
   But for the final dir a/b/c, the 300 rule doesn't apply,
   so it's 777 less 202 permissions:
   r-xrwxr-x

   Solaris /bin/mkdir:
   $ umask 202 
   $ /bin/mkdir -p a/b/c
   $ ls -ld a a/b a/b/c
   drwxrwxr-x   3 chin     staff        512 Aug 14 15:16 a
   drwxrwxr-x   3 chin     staff        512 Aug 14 15:16 a/b
   dr-xrwxr-x   2 chin     staff        512 Aug 14 15:16 a/b/c
   $ /bin/rm -rf a
   
   ksh93 built-in mkdir:
   $ mkdir -p a/b/c
   $ ls -ld a a/b a/b/c
   drwxrwxr-x   3 chin     staff        512 Aug 14 15:17 a
   drwxrwxr-x   3 chin     staff        512 Aug 14 15:17 a/b
   drwxrwxr-x   2 chin     staff        512 Aug 14 15:17 a/b/c

   Note that the permissions of the final dir, a/b/c, still adds the 300
   permission mode back in.

4. Manpage changes

   The diff-marked manpages are required to submit the ARC case.  
   However, some of the manpage changes may be dependent upon 
   what happens with the above issues.

5. I18N

   ksh93 may need additional changes to allow it to deliver messages
   to the localization groups.


Reply via email to