home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / BASH_112.ZIP / README.OS2 < prev   
Text File  |  1993-12-06  |  4KB  |  75 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                            README FOR BASH-1.12 UNDER OS/2
  8.  
  9.  
  10.      This archive consists of files which I downloaded from the GNU FTP site at
  11.      MIT and modified so that they would compile and mostly work under OS/2.  I
  12.      use the HPFS on my system, so the file names have not been changed to the
  13.      dreaded 8.3 format.  The programs in this archive will compile under the
  14.      emx 0.8g version of the GNU compiler.  The Makefile is intended for use
  15.      with dmake.
  16.  
  17.      This file is an important improvement over various versions of bash(1)
  18.      which are available for OS/2.  The other ports do not get status from child
  19.      processes, hence are virtually useless for running things like
  20.      configuration scripts.  The problem is caused by the emx implementation of
  21.      the fork() command.  The really ugly  hacks were an attempt to work around
  22.      problems with fork().  This is not a complaint - the marvel is not that
  23.      fork works imperfectly but that it works at all under OS/2.  Where ever
  24.      possible I replaced the fork(); exec() sequence with a direct OS/2 DosExec
  25.      call.  I also made some mods to the emx library related to the exec()
  26.      function.  One of these is very important in that it fixes a bug in
  27.      spawnve() which causes bash (or any other program) to crash if it attempts
  28.      to exec a program and pass more that 512 characters of parameter
  29.      information.  Even if you decide not to use bash I STRONGLY reccomend that
  30.      you make this fix in your copy of the emx library.  The other changes
  31.      enable a caller to run programs pretty much as OS/2 shells run them.  i.e.,
  32.      if it can not find the input file on the path it attempts to append '.exe'
  33.      to the input file name and run the resulting file.  If the given file
  34.      appears to be ascii the library routines assume the file is a command
  35.      script and use the UNIX #! thing to try and find the shell.  Oh yes, there
  36.      are some ugly changes required because OS/2 will not allow a parent to
  37.      receive exit status from a grandchild.  I made other hacks as required - I
  38.      can't remember all the reasons.  Mostly changes are marked with my initials
  39.      (ROB) and the date.
  40.  
  41.      The resulting executable is by no means perfect, and the unbiased observer
  42.      would probably not even call it good.  However, it is stable, and operates
  43.      fairly reliably.  I mostly use it to run configuration scripts that
  44.      typically come with GNU source archives.  These files generally need some
  45.      hand configuration.  Change things like /bin/sh to bash, change
  46.      redirections from /dev/null to nul, make sure CC equals gcc or your
  47.      favorite compiler, make executable file names end with .exe, etc.  Running
  48.      the scripts is generally uneventful, except that the shell sometimes
  49.      receives some 'hangup` signals.  I can't find the reason for this.  I don't
  50.      even know how often you will have to edit the resulting Makefile by hand
  51.      because of this situation.
  52.  
  53.      If a script uses "here indirections", ie things like
  54.           cat<<END_OF_FILE
  55.      you must have a directory /tmp on your current disk.  Temporary files are
  56.      created there.  Unfortunately, they are not deleted so you will have to go
  57.      into this directory and delete the files there by hand from time to time.
  58.      Or, you could do that during your start up procedure.
  59.  
  60.      Making bash requires dmake.  I have been unable to use GNU make
  61.      successfully because I can't get things like
  62.           -DVAR=\"Some text\"
  63.      to work under OS/2.  To make bash proceede as follows:
  64.        1. Edit the file /emx/include/sys/process.h by deleting the qualifier
  65.           __volatile__ from the definition of abort().  I have made other
  66.           changes to the emx include files but I have been less than rigorous in
  67.           recording them, so you may have to make a few other changes as well.
  68.        2. Execute dmake in each of the three directories lib/glob, lib/readline/
  69.           and lib/builtins.
  70.        3. In the main bash directory type `dmake -f makefile.os2'.
  71.  
  72. My Email address:
  73.     robrien@gsfcmail.nasa.gov
  74.  
  75.