🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

5 total messages Started by mark edwards Wed, 18 Mar 1987 02:18
vms format files and unix format files
#18
Author: mark edwards
Date: Wed, 18 Mar 1987 02:18
30 lines
1788 bytes
 I have been playing around with rrn on Eunice these days and have
 notice some interesting (read: very frustrating and maddening )
 features of Eunice.

 It seems to make a difference in what format a file is. There are
 two formats, at least, unix and VMS. Now I had gotten rrn working
 as for as being able to read news and postnews remotely, but I 
 could not save the articles that I wanted to. It said it saved it
 and then I looked in the directory. Nothing there. Well I realize
 that Eunice has problems returning error coders of forked processes
 and such. But lying about what it is doing is another story.

 The problem was that the "mbox.saver" shell script was in Unix format.
 I changed it to VMS format and viola it worked. Before doing this 
 I noticed that the script when called from csh would fault with 
 the typical VMS error code "Error in Activation" or something like
 that. But when I ran it through sh on the command line it worked.
 After changing it to VMS format it worked on the command line without
 the sh.

 Does anybody have an explanation for this ????

 Yes I use Eunice. Do You ?
 mark

-- 
    edwards@unix.macc.wisc.edu
    {allegra, ihnp4, seismo}!uwvax!uwmacc!edwards
    UW-Madison, 1210 West Dayton St., Madison WI 5370ug
Re: vms format files and unix format files
#20
Author: Joe Buck
Date: Wed, 18 Mar 1987 22:20
24 lines
1764 bytes
In article <1250@uwmacc.UUCP> edwards@uwmacc.UUCP (mark edwards) writes:
>
> I have been playing around with rrn on Eunice these days and have
> notice some interesting (read: very frustrating and maddening )
> features of Eunice.

You aren't alone.  I did the Eunice code for 2.11 news.  What a bitch!

Shell scripts must be in "VMS format" (specifically, variable length,
carriage return format) to be executable.  Otherwise Eunice thinks
you're trying to execute a VMS image, and you get strange error
messages indicating that you're executing an invalid image (something
about $IMGACT failing).  You can say "sh file" or "csh file"
regardless of format, though.  But Wollongong could have had the
exec call check for the "#!" magic cookie regardless of format,
thus avoiding this problem.  But NOOOOO!

Also, doing random seeks and modifications to a file only works if
it's in Unix format.  Never let your active file get in VMS format,
or all bets are off.  Your news system will be trashed.
-- 
- Joe Buck 	{hplabs,ihnp4,sun,ames}!oliveb!epimass!jbuck
		seismo!epiwrl!epimass!jbuck  {pesnta,tymix,apple}!epimass!jbuck
  Entropic Processing, Inc., Cupertino, California
Re: vms format files and unix format files
#22
Author: leres
Date: Tue, 24 Mar 1987 05:58
16 lines
1387 bytes
There's a reason why exec() works the way it does under Eunice; it's
faster for the 99% case. If the file is fixed length, exec() simply
tries to execute it as a VMS image. If it's a variable length file, it
reads a record to extract the name of the shell to use. Those who know
how slow file I/O is under VMS will see why you want to avoid the read.
It may not seem like much overhead, but Unix programs use exec()
extensively and it quickly adds up.

I disagree with the statement that random seeks only work with Unix
files; although not efficient, random seeks work fine. They are slow
when dealing with a variable length file is because you must seek to
the beginning of the file and read until you get to the right place.
So make sure /etc/termcap is a fixed length file!

		Craig
Re: vms format files and unix format files
#24
Author: jbuck
Date: Tue, 24 Mar 1987 23:40
38 lines
2059 bytes
In article <17989@ucbvax.BERKELEY.EDU> leres@ucbarpa.Berkeley.EDU (Craig Leres) writes:

>There's a reason why exec() works the way it does under Eunice; it's
>faster for the 99% case. If the file is fixed length, exec() simply
>tries to execute it as a VMS image. If it's a variable length file, it
>reads a record to extract the name of the shell to use.

Ah, but it would add no overhead at all to see if it's a shell script
after trying to execute it as a VMS image fails.

If the Eunice developers were so concerned about speed they should
have made sure that scripts beginning with

#! /bin/csh -f

work correctly (the -f flag is ignored, meaning the user's .cshrc
file is always read).

>I disagree with the statement that random seeks only work with Unix
>files; although not efficient, random seeks work fine. 

You misquoted (or rather, misparaphrased) me.  I said you can't
UPDATE a "VMS format" file using random seeks (as in read-modify-write).
If you try, you'll get garbage.

>They are slow
>when dealing with a variable length file is because you must seek to
>the beginning of the file and read until you get to the right place.
>So make sure /etc/termcap is a fixed length file!

Doesn't help.  /etc/termcap is read from the beginning.



-- 
- Joe Buck 	{hplabs,ihnp4,sun,ames}!oliveb!epimass!jbuck
		seismo!epiwrl!epimass!jbuck  {pesnta,tymix,apple}!epimass!jbuck
  Entropic Processing, Inc., Cupertino, California
Re: vms format files and unix format files
#23
Author: kashtan
Date: Wed, 25 Mar 1987 06:50
13 lines
1368 bytes
As the person who did the original Eunice, you can blame me for this
problem.  It is certainly the case that, as of the 4.3bsd-based version
of Eunice, the "#! /bin/csh -f" construct does indeed work and that csh
WILL ignore any startup files.  Craig's explanation for the apparent
problem with shell scripts still in UNIX format is correct.  The problem
is that by the time you are actually activating the image control is in
the CLI of the process that runs the program.  This is an impoverished
enough execution environment that it is extremely difficult to change
the program invocation to shell invocation with the appropriate arguments.
So, in order to keep from having to read the executable file several times
the assumption is made that shell scripts will ALWAYS be in VMS text format.
David
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads