BASH-1.12 UNDER OS/2

PMShell 0 69 05.14 23:07







                           README FOR BASH-1.12 UNDER OS/2



     This archive consists of files which I downloaded from the GNU FTP site at

     MIT and modified so that they would compile and mostly work under OS/2.  I

     use the HPFS on my system, so the file names have not been changed to the

     dreaded 8.3 format.  The programs in this archive will compile under the

     emx 0.8g version of the GNU compiler.  The Makefile is intended for use

     with dmake.


     This file is an important improvement over various versions of bash(1)

     which are available for OS/2.  The other ports do not get status from child

     processes, hence are virtually useless for running things like

     configuration scripts.  The problem is caused by the emx implementation of

     the fork() command.  The really ugly  hacks were an attempt to work around

     problems with fork().  This is not a complaint - the marvel is not that

     fork works imperfectly but that it works at all under OS/2.  Where ever

     possible I replaced the fork(); exec() sequence with a direct OS/2 DosExec

     call.  I also made some mods to the emx library related to the exec()

     function.  One of these is very important in that it fixes a bug in

     spawnve() which causes bash (or any other program) to crash if it attempts

     to exec a program and pass more that 512 characters of parameter

     information.  Even if you decide not to use bash I STRONGLY reccomend that

     you make this fix in your copy of the emx library.  The other changes

     enable a caller to run programs pretty much as OS/2 shells run them.  i.e.,

     if it can not find the input file on the path it attempts to append '.exe'

     to the input file name and run the resulting file.  If the given file

     appears to be ascii the library routines assume the file is a command

     script and use the UNIX #! thing to try and find the shell.  Oh yes, there

     are some ugly changes required because OS/2 will not allow a parent to

     receive exit status from a grandchild.  I made other hacks as required - I

     can't remember all the reasons.  Mostly changes are marked with my initials

     (ROB) and the date.


     The resulting executable is by no means perfect, and the unbiased observer

     would probably not even call it good.  However, it is stable, and operates

     fairly reliably.  I mostly use it to run configuration scripts that

     typically come with GNU source archives.  These files generally need some

     hand configuration.  Change things like /bin/sh to bash, change

     redirections from /dev/null to nul, make sure CC equals gcc or your

     favorite compiler, make executable file names end with .exe, etc.  Running

     the scripts is generally uneventful, except that the shell sometimes

     receives some 'hangup` signals.  I can't find the reason for this.  I don't

     even know how often you will have to edit the resulting Makefile by hand

     because of this situation.


     If a script uses "here indirections", ie things like

          cat<<END_OF_FILE

     you must have a directory /tmp on your current disk.  Temporary files are

     created there.  Unfortunately, they are not deleted so you will have to go

     into this directory and delete the files there by hand from time to time.

     Or, you could do that during your start up procedure.


     Making bash requires dmake.  I have been unable to use GNU make

     successfully because I can't get things like

          -DVAR=\"Some text\"

     to work under OS/2.  To make bash proceede as follows:

       1. Edit the file /emx/include/sys/process.h by deleting the qualifier

          __volatile__ from the definition of abort().  I have made other

          changes to the emx include files but I have been less than rigorous in

          recording them, so you may have to make a few other changes as well.

       2. Execute dmake in each of the three directories lib/glob, lib/readline/

          and lib/builtins.

       3. In the main bash directory type `dmake -f makefile.os2'.


My Email address:

robrien@gsfcmail.nasa.gov


Comments

Category
State
  • 현재 접속자 60 명
  • 오늘 방문자 560 명
  • 어제 방문자 683 명
  • 최대 방문자 934 명
  • 전체 방문자 270,778 명
  • 전체 게시물 461 개
  • 전체 댓글수 155 개
  • 전체 회원수 22 명
- 예전 사이트 : 2011 eComStation
- 쇼핑몰 : Softbox
Facebook Twitter GooglePlus KakaoStory NaverBand