home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23305 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  4.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!drycas.club.cc.cmu.edu!ghod
  2. From: ghod@drycas.club.cc.cmu.edu
  3. Newsgroups: comp.os.linux
  4. Subject: Re: ANNOUNCE: BSD C Shell for Linux
  5. Message-ID: <1993Jan8.203013.2857@drycas.club.cc.cmu.edu>
  6. Date: 8 Jan 93 20:30:12 -0500
  7. References: <1993Jan8.152644.21983@klaava.Helsinki.FI>
  8. Followup-To: comp.os.linux
  9. Organization: Carnegie Mellon Computer Club
  10. Lines: 91
  11.  
  12. In article <1993Jan8.152644.21983@klaava.Helsinki.FI>, rchen@sfu.ca (Robert Chen) writes:
  13. > Hi.  About a week ago I posted whining about there not being many
  14. > working shells around for Linux.  Since then I see that ksh has been
  15. > uploaded to Sunsite and a newer version of tcsh.  To add to the list,
  16. > here is the "standard" C Shell.  I forgot to put into the readme that
  17. > you will probably want to put stty erase ^'?' into your .cshrc if you
  18. > like using backspace.  
  19. > The file is called csh526a.tar.Z and is currently on
  20. > sunsite.unc.edu:/pub/Linux/Incoming.  I imagine it will get moved to 
  21. > /pub/Linux/system/Shells soon.  It includes source and diffs.
  22. > Here is the README:
  23. > - Ken
  24.  
  25. [fine README file deleted to save bandwidth]
  26.  
  27. I remember your first post and I'm glad you managed to pull it off. At the
  28. time, I had just downloaded the source to tcsh-6.03 and was getting ready to
  29. compile it, fully expecting to have to make a load of patches. As it turns out,
  30. it had a config file for Linux and it compiled without a hitch. It also
  31. dumped core on execution. :)
  32.  
  33. After an intense debugging session, I found the problem, sort of. tcsh was
  34. bombing during the initialization sequences in sh.c. Specifically, it crapped
  35. out because of a sigaction() call which it was using to determine the action
  36. status of SIGINT (it later did the same for SIGTERM, but it would always crash
  37. before it ever got there). If you have the source to tcsh 6.03, check around
  38. line 563 in sh.c and you'll see the block of code in question. What you'll
  39. actually see is a call to mysigvec() which is really sigaction() in disguise
  40. via a #define somewhere in the header files. This #definition caused problems
  41. when I tried to run the thing through gdb, since the #define masked the actuall
  42. call that was being executed in such a way that gdb couldn't tell me exactly
  43. what source line was causing the trouble. 
  44.  
  45. (Also, for those keeping track, chalk up another case of gdb affecting the
  46. operation of a program. When running the program (compiled with -g) in gdb
  47. without any breakpoints, it would still dump core. Once I set a breakpoint
  48. however, I could run the program, wait for it to stop at the breakpoint, then
  49. continue and the SIGSEGV that caused the thing to die would magically
  50. disappear.)
  51.  
  52. Anyway, I applied a temporary fix. I seems there's an alternate section of the
  53. code which just uses signal() instead of sigaction(). The signal() version
  54. is compiled in if BSDSIGS is *not* defined in config.h (the Linux version of
  55. the config file defines BSDSIGS by default, which seems reasonable I suppose). 
  56. My fix was to hack things a bit so that the signal() version of the code was
  57. compiled instead. This does not mean #undefining BSDSIGS, since this would mess
  58. up other things. But for the sake of this one section of code, it makes pretend
  59. that BSDSIGS isn't there. (The whole procedure involved commenting out a few
  60. lines.) For the moment, I have it installed and it seems to be working just
  61. great. 
  62.  
  63. I'm going to download the csh source and give it a try (you can never have too
  64. many shells :). However, you mentioned in the README section that your tcsh
  65. didn't work. I'd be interested to know what its problems are, and if they're
  66. related to the ones I had. I intend to do a little more debugging on tcsh to
  67. see if I can find out exactly why this sigaction() call is being botched
  68. (sigaction() is used elsewhere, but this is the only place where it causes
  69. problems). Thankfully, I still have the objects from the last compiling
  70. session -- it takes an hour to build tcsh on my puny 16 Mhz 386, which is about
  71. as long as it takes to build the kernel. :) 
  72.  
  73. For the record, here's my setup:
  74. 16 Mhz 386SX/SL (no math co-processor)
  75. 4 megs RAM
  76. 42 meg Seagate ST351A/X IDE hard disk (28ms -- slow, but strudy :)
  77. (4 meg swap partition)
  78. 2400 baud internal modem (generic/hayes)
  79. Base SLS system (a1-a4 and most of b1-b6)
  80. Linux 0.99.2
  81. X11
  82. groff stuff
  83. tcp/ip stuff
  84. smail
  85. gcc 2.2.2d
  86.  
  87. As you can see, I have a pretty minimal system hardware-wise, but I still
  88. managed to get a whole bunch of stuff installed. Yes, X works pretty well, even
  89. with just 4 megs of RAM. 
  90.  
  91. All my libs are from the current SLS distribution. No, I don't have
  92. libc.so.4.2 yet: my stuff has been working just fine all along, so if it ain't
  93. broke, I ain't gonna fix it. I will upgrade once the next SLS release comes out
  94. though. I have considered that my troubles may stem from a busted
  95. library, but that seems unlikely. Maybe it's just me. :)
  96.  
  97. -Bill
  98.  
  99. ghod@drycas.club.cc.cmu.edu
  100.