Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!hubcap!gatech!mcnc!uvaarpa!haven!adm!news From: IN% Postmaster@VAX1.Mankato.MSUS.EDU %MKVAX1.DECNET@msus1.bitnet (PMDF Mail Server) Newsgroups: comp.unix.wizards Subject: Undeliverable mail: SMTP delivery failure Message-ID: <26047@adm.brl.mil> Date: 18 Feb 91 08:34:25 GMT Sender: news@adm.brl.mil Lines: 618 Return-path: Date: Sat, 16 Feb 1991 14:12 CST From: PMDF Mail Server Subject: Undeliverable mail: SMTP delivery failure To: "MSUS1::IN%\"UNIX-WIZARDS@BRL.MIL\""@VAX1.Mankato.MSUS.EDU Message-id: <20BB4972C0207F88@VAX1.Mankato.MSUS.EDU> The message could not be delivered to: Addressee: BD6@MKATT1.MANKATO.MSUS.EDU Reason: Illegal host/domain name found. ---------------------------------------- Received: from DECNET-MAIL by VAX1.Mankato.MSUS.EDU with PMDF#10000; Sat, 16 Feb 1991 05:50 CST Date: Sat, 16 Feb 1991 05:50 CST From: "MSUS1::IN%\"UNIX-WIZARDS@BRL.MIL\""@VAX1.Mankato.MSUS.EDU Subject: UNIX-WIZARDS Digest V12#020 To: BD6@MKATT1.MANKATO.MSUS.EDU Message-id: X-VMS-To: "Brian D. Goecke" Return-path: Received: from NDSUVM1.BITNET (MAILER@NDSUVM1) by MSUS1.MSUS.EDU with PMDF#10130; Sat, 16 Feb 1991 05:49 CST Received: by NDSUVM1 (Mailer R2.07) id 6467; Sat, 16 Feb 91 05:44:58 CST Date: Sat, 16 Feb 91 05:45:03 EST From: Mike Muuss The Moderator Subject: UNIX-WIZARDS Digest V12#020 Sender: Unix-Wizards Mailing List To: "Brian D. Goecke" Reply-to: UNIX-WIZARDS@BRL.MIL Message-id: X-To: UNIX-WIZARDS@BRL.MIL UNIX-WIZARDS Digest Sat, 16 Feb 1991 V12#020 Today's Topics: Finding tape block size Re: Finding tape block size Re: Stuck-up Wizards (Re: Summary and Fix for "slashes in filenames") Re: Stuck-up Wizards Re: Loading and Executing Object Code at Runtime Re: SIGCONT occurs after a SIGTERM Re: Help! There's a slash '/' in my filename. Re: Putenv() & Getenv() Bug ? converting termcap to termlib Re: Counting FLOPS ----------------------------------------------------------------- From: Anthony DeBoer Subject: Finding tape block size Date: 12 Feb 91 22:43:53 GMT To: unix-wizards@sem.brl.mil I periodically get tapes from client's systems or other sources where the precise tape format isn't documented. What I'm looking to find out is if there's a way to determine exactly what block size was used when the tape was written, or even if this is a major requirement (should I even be worrying about it or not?). Reading with a tasteful default value usually seems to work (even a 512-byte block size has worked before, although at tremendous loss of efficiency), but I'm wondering if there's any chance of data loss with the wrong block size, or any rule of thumb for optimizing things. I have several systems here, so as far as naming my hardware/software configuration goes I'll just mention the Unisys 6000/50 running SVR3.0 with a 150meg QIC drive. And I shouldn't forget the old Convergent Technologies Mightyframe. -- Anthony DeBoer NAUI#Z8800 | adeboer@gjetor.geac.com | Programmer (n): One who Geac J&E Systems Ltd. | uunet!geac!gjetor!adeboer | makes the lies the Toronto, Ontario, Canada | #include | salesman told come true. ----------------------------- From: George Robbins Subject: Re: Finding tape block size Date: 16 Feb 91 05:17:06 GMT To: unix-wizards@sem.brl.mil In article <1991Feb12.224353.6514@gjetor.geac.COM> adeboer@gjetor.geac.COM (Anthony DeBoer) writes: > I periodically get tapes from client's systems or other sources where the > precise tape format isn't documented. What I'm looking to find out is if > there's a way to determine exactly what block size was used when the tape was > written, or even if this is a major requirement (should I even be worrying > about it or not?). Reading with a tasteful default value usually seems to > work (even a 512-byte block size has worked before, although at tremendous > loss of efficiency), but I'm wondering if there's any chance of data loss with > the wrong block size, or any rule of thumb for optimizing things. dd if=/dev/nrmt* of=diskfile bs=65535 count=1 ; ls -l diskfile ... - or - dd if=/dev/nrmt* bs=65535 count=1 | wc -c Different tape devices have different characteristics. A sun type cartridge tape is insensitive to blocksize (except as a performance issue), traditional raw 9-track tapes may well lose data... -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing: domain: grr@cbmvax.commodore.com Commodore, Engineering Department phone: 215-431-9349 (only by moonlite) ----------------------------- From: Doug Gwyn Subject: Re: Finding tape block size Date: 16 Feb 91 05:34:24 GMT To: unix-wizards@sem.brl.mil In article <1991Feb12.224353.6514@gjetor.geac.COM> adeboer@gjetor.geac.COM (Anthony DeBoer) writes: >... if there's a way to determine exactly what block size was used when the >tape was written, or even if this is a major requirement (should I even be >worrying about it or not?). Assuming your tape subsystem conforms to long-established UNIX practice, if the read() system call specifies a read count less than the actual block size when reading the "raw tape" device (which is the usual one), you should get an I/O error since data will be lost. (If you're trying to read a "tar" or "cpio" archive, and data ever does get silently lost, you should see archive checksum comparison errors.) For read counts in excess of the block size, read() returns the actual amount of data read, not the requested size. Therefore the usual practice is to try to read using an over-generous allocation for the input buffer, which should not introduce any significant amount of inefficiency. If you have an oddball device driver or hardware, you may be out of luck. ----------------------------- From: "Blair P. Houghton" Subject: Re: Stuck-up Wizards (Re: Summary and Fix for "slashes in filenames") Date: 13 Feb 91 21:21:06 GMT Sender: news@inews.intel.com To: unix-wizards@sem.brl.mil In article <=H_&Z9#@rpi.edu> rodney@sun.ipl.rpi.edu (Rodney Peck II) writes: >You've missed the point. I don't think that most of the flame here is >because someone asked how to get rid of a file with a '/' in it. It is >instead because of all the people who are offering wrong answers. > >This exact argument went though this group last year with basically the >same results. Those who do not learn from history are numerous and reproductive; so, what's your point? >The point is -- this is supposed to be a place where people who really >actually guarenteed know the answer to some difficult question will answer >you. cuw is not the place for people to throw in their two cents. There's >a whole other tree that was created for just that purpose. And which might that be? I've seen plenty of comp.unix.internals/wizards threads that were valuable only after a large number of people had tweaked the solution. That's how problems get solved. Anyone who is capable of solving problems alone isn't hanging around playing pinochle and kibbitzing about slashes in filenames. And, some questions have no answer, only answer-determining algorithms, with many decision points, with many options, depending on the systems under which the algorithms are to be implemented. I'd rather have fifty short, half-right answers and a clue than one, dead-right answer and be left with the need to post asking what the answer means on my platform. Someone posted something incorrect? Welcome to the planet Earth. Say it's wrong, say what's right, give us all some sleep. (Pardon my hypocrisy; someone's gotta sacrifice so that others may gain, and I have little to lose. (Hi, Doug! :-)) >and finally, just because a question comes back again and again, doesn't >mean that all the wrong answers have to be dragged out again. As a tautology, that would be correct, if only because asking a repeated question can't prevent a wrong answer. However, it's likely that if the question didn't get into everyone's knowledge, the correct answer couldn't have, either. In fact, if in the standard methodology the answer is hidden but necessary, then the question must eventually be deduced, but the answer -- right or wrong -- would have to wait for the question before it could be produced. >if someone wants to say "hey I read these answers in >the faq, and I didn't see this idea .... why won't this work?" -- that, >in my opinon, would be fine. Elitism is no defense for flaming this poor slob: "Hey, I've been reading this group far longer than my employer and I think is valuable (must be ten minutes, at least), and I haven't come across this question, and I'm on a deadline and ... how do I get back rm'ed files?" Any question has essentially that same etiology, even if the deadline is only for personal reasons, or economics is only a minor cause. If you had the time and character to wait for the truth to come to you, or the resources to attract it irresistably, you wouldn't need question marks at all. Anyone who asks "What's a FAQ?" without first having heard of one is clairvoyant. >in summary -- it's not a question of people being out of line. it's a >question of being considerate when you offer advice to someone who is >expecting your answer to work. The general admonition for that is to test it yourself. But even that is a lesson that requires experience to prove its economy. --Blair "You don't. You weep for their unlinking and pray that it's on the backups and you can find a good hypnotist to help you type in your changes again." ----------------------------- From: Doug Gwyn Subject: Re: Stuck-up Wizards Date: 16 Feb 91 05:27:44 GMT To: unix-wizards@sem.brl.mil In article <2509@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes: >>cuw is not the place for people to throw in their two cents. There's >>a whole other tree that was created for just that purpose. >And which might that be? Comp.unix.questions, which you presumably know since you posted to both groups. Come on, get with the program! ----------------------------- Subject: Re: Loading and Executing Object Code at Runtime Date: 14 Feb 91 07:22:52 GMT To: unix-wizards@sem.brl.mil In an article, flan@cics.Berkeley.EDU (Ian Flanigan) writes: >Hi, > >I tried posting this to comp.unix.questions first, but as I got no answer >I figured this must be a Wizard level question: > >I'm wondering how to load an object file (my_functions.o) at execution >time and execute a function contained therein. I know this is possible >since many flavors of LISP allow you to compile your functions and then >load the compiled versions later. When you are talking about compiling functions and loading the compiled versions later, are you talking about using a linkage editor to build a runable image? If you're trying to do what it looks like you're trying to do, the answer is "you can't get there from here." You would have open the object file, load the function within the context of the current process (a real trick), allocate the core for data, stack, and bbs, push the stack frame, and jump to the address of this arbitrary function. Just ain't no way you can be doin' this in user mode. -- Michael Stefanik | Opinions stated are not even my own. Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike ------------------------------------------------------------------------------- technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly found to be saying things like "Well, it works on my DOS machine ..." ----------------------------- From: Tom Christiansen Subject: Re: Loading and Executing Object Code at Runtime Date: 15 Feb 91 17:30:24 GMT Sender: news access account Nntp-Posting-Host: pixel.convex.com To: unix-wizards@sem.brl.mil From the keyboard of uunet!bria!mike: :If you're trying to do what it looks like you're trying to do, the answer :is "you can't get there from here." You would have open the object file, :load the function within the context of the current process (a real trick), :allocate the core for data, stack, and bbs, push the stack frame, and :jump to the address of this arbitrary function. Just ain't no way you :can be doin' this in user mode. Never say never. It certainly is on some architectures. Just malloc or mmap in some pages as RWX, then load the position-independently compiled functions in there from disk, and call through a function pointer. There are also overlay schemes available -- that's what I used to do on Z80 machines. You could also use overlays on PDP-11's. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "All things are possible, but not all expedient." (in life, UNIX, and perl) ----------------------------- From: Guy Harris Subject: Re: Loading and Executing Object Code at Runtime Date: 15 Feb 91 23:11:31 GMT To: unix-wizards@sem.brl.mil >A quite widespread hideous idiosyncratic restriction is that on >some architectures, notably the 386, you can't execute out of data >space. What's "data space", and how is it different from any other sort of space? (Most UNIX systems run with a flat address space on 386es. PTEs on the 386 only have a "writable" bit.) ----------------------------- From: "Brandon S. Allbery KB8JRR" Subject: Re: SIGCONT occurs after a SIGTERM Date: 15 Feb 91 00:56:23 GMT Followup-To: comp.unix.questions To: unix-wizards@sem.brl.mil As quoted from <7103@fs1.cam.nist.gov> by coleman@cam.nist.gov (Sean Sheridan Coleman X5672): +--------------- | Please explain to me why a SIGCONT is sent to a process after | SIGTERM is sent to my process. It doesn't compute because TERM +--------------- Being suspended, it wouldn't execute the signal handler unless it were continued. Also, I think the exit processing in the kernel needs this. (So why does the SIGCONT handler run after the SIGTERM handler? Because signal handlers are invoked in signal-number order.) ++Brandon (BSD folks feel free to correct me.) -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY ----------------------------- From: Robert Claeson Subject: Re: Help! There's a slash '/' in my filename. Date: 15 Feb 91 08:11:41 GMT To: unix-wizards@sem.brl.mil In article bzs@world.std.com (Barry Shein) writes: >From: s082@brems.ii.uib.no >>Just one thing: Why would anyone want a slash (or any such character) a >>filename in the first place? > >Perhaps the file name was in Norwegian? :-) ..... >Doesn't norwegian use o-slash and all that? Yes, but it's o-slash as a single seven-bit or eight-bit character and not an "o" followed by a slash. -- Robert Claeson Disclaimer: I represent myself and not my employer. ----------------------------- From: Erik Naggum Subject: Re: Help! There's a slash '/' in my filename. Date: 15 Feb 91 09:15:08 GMT Sender: Erik Naggum To: unix-wizards@sem.brl.mil In article , Barry Shein writes: > From: s082@brems.ii.uib.no > >Just one thing: Why would anyone want a slash (or any such character) a > >filename in the first place? > Perhaps the file name was in Norwegian? :-) I fail to see the humor in this. > Doesn't norwegian use o-slash and all that? Norwegian does overload (as per ISO 646) [\]{|} into (ISO 8859-1 alert) FXEfxe, but / remains /. Norwegians may actually use - or . to separate the parts of the date spec, so you might be better off with one of us Viking descendants... (Presently, I'm glad that we did not inherit their Runes, even though the winter weather outside is reminiscent of the Fimbulvinter we will see shortly before, or was it after, the end of the world.) My parents were fortunately smart enough to choose a family name without any of the "national" characters, and to give me a name without any of them, too, which might or might not have been caused by a quite astonishing amount of foresight. I've already decided on a dedication line for any books I might produce: To my parents, who kindly avoided F, X, and E in my name. Finally, I hope this makes it out with the ISO 8859-1 intact. If not, some of you might wonder what's so special with F, X and E. -- [Erik Naggum] Naggum Software, Oslo, Norway ----------------------------- From: Jenner Subject: Re: Help! There's a slash '/' in my filename. Date: 16 Feb 91 05:22:04 GMT To: unix-wizards@sem.brl.mil In article <1991Feb13.120201.13608@eik.ii.uib.no>, s082@brems.ii.uib.no writes: > > There seems to be a rather lengthy discussion going on about slashes in > filenames, > how to get them there, and whether to ask questions about them... > Just one thing: Why would anyone want a slash (or any such character) a > filename in the first place? Maybe they didn't. How bout this sceniero. person types: foo/bar and hits return wanted to type: foo.bar and hit return look at your keyboard. it is possible. "Users. If we could only keep 'em off the machine." cedgman jenner .....................................dfpedro@uswnvg.UUCP *Disclaimer? You bet! I speak for myself only.* ----------------------------- From: "S. A. Rasche" Subject: 'Talk' off campus Date: 15 Feb 91 13:42:54 GMT Sender: scrs_ltd@uhura.cc.rochester.edu To: unix-wizards@sem.brl.mil Does anyone know how to get the 'talk' command to work off campus?? I have used it on the University of Rochester campus, but when I try to 'talk' to someone at let's say Ga. Tech, it doesn't work. I try 'talk gt7164b@prism.gatech.edu' but nothing happens or I get a response saying that they are an unknown host or something like that. Can anyone in this news group help me???? Thanks a bunch, Shorts --Tip your bartenders - Tip your friends-- Kevn Kinney ----------------------------- From: "Conor P. Cahill" Subject: Re: Putenv() & Getenv() Bug ? Date: 15 Feb 91 14:03:09 GMT To: unix-wizards@sem.brl.mil borzieri@KING.ICO.OLIVETTI.COM (Ivan Borzieri) writes: >in the first c module I call the system function "putenv()" which should >set a variable in the environment. >In the second c module I call the system function "getenv()" to read >the value of the previous set variable. the problem is *PROBABLY* that you are using a local variable in the call to putenv. local data is lost when you return from the function and thereafter unavailable. the putenv(3) man page states that you shouldn't do this. The argument to putenv should point to a static data area or a malloc'd data area. All this is predicated on the fact that both modules (the one calling putenv and the one calling getenv) are called from the same executable. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc. uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- Subject: Re: Putenv() & Getenv() Bug ? Date: 16 Feb 91 02:25:54 GMT To: unix-wizards@sem.brl.mil In an article, KING.ICO.OLIVETTI.COM!borzieri (Ivan Borzieri) writes: >I wrote two c modules called by a fortran main. >in the first c module I call the system function "putenv()" which should >set a variable in the environment. >In the second c module I call the system function "getenv()" to read >the value of the previous set variable. >The value returned by getenv() is NULL, id est, that variable >doesn't exist. >Now my question is : is this right ? I have found putenv() to be particuarly annoying, and wonderfully inconsistent in implementation. For example, not all putenv()'s guarantee that the newly created variable is inherited by child processes. Try this ditty to see if your putenv() is broken: #include main() { putenv("FOO=BAR"); printf("FOO=%s\n",(char *)getenv("FOO")); if ( fork() ) wait(NULL); else execlp("/bin/sh","/bin/sh",NULL); } When you run this program, you should see "FOO=BAR" and then a shell prompt; type "echo $FOO" and you should get "BAR". Press CTRL-D to jump out of the subshell. If you don't get this kind of response, I would consider your putenv() broken. If it is broken, then write some subroutines to handle the environment yourself (_environ is a pointer to an array of pointers to char's that is the current environment). Use execle() or execve() to pass your own table to a child process. If you need more specific information on doing this type of thing, send me mail, and I'll help. >I know that in C-Shell scripts, when you set variables you loose them >as you exit the script. >Is it the same or this is a operating system bug ? Neither. Is is a "problem" with the way that the putenv() and getenv() subroutines are implemented. Shell variables are "lost" because scripts are executed in subshells. Golden rule: No child process may modify its parent's environment. Hope this helps. -- Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own. Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike ------------------------------------------------------------------------------- Remember folks: If you can't flame MS-DOS, then what _can_ you flame? ----------------------------- From: "E. L. Salant" Subject: converting termcap to termlib Keywords: termcap termlib tic Date: 15 Feb 91 19:17:35 GMT Sender: news@crdgw1.crd.ge.com Followup-To: comp.unix.wizards To: unix-wizards@sem.brl.mil I am trying to run a cursesX application on our new DecStation 5000, and have found that there is no termlib entry for xterm. I therefore took the termcap entry and did a tic -v on it. While the tic command seemed to work ok (it created an xterm directory in /usr/lib/terminfo/x), when I try running my application I get "Sorry, I don't know how to deal with your 'xterm' terminal" coming from initscr. Why isn't it finding the xterm entry in termlib?? Please respond directly to me and thanks for your help - Eliot Salant ----------------------------- From: Doug Gwyn Subject: Re: Counting FLOPS Date: 15 Feb 91 19:31:44 GMT Followup-To: comp.unix.questions To: unix-wizards@sem.brl.mil In article <5025@umbc3.UMBC.EDU> rouben@math9.math.umbc.edu writes: >How does one count the number of floating point operations (flops) during >the execution of a C program? I for one would have to know exactly what is meant by a "FLOP". I'm not being facetious; there is considerable truth to the saying that "there are lies, damned lies, and benchmarks". (Originally "statistics" was the third category, but it was adapted for modern purposes.) On all computing architectures known to me, different floating-point operations take different amounts of time, sometimes in fact dependent on the content of the data being operated on; thus an measure such as "FLOPs per second" is not a very well- defined quantity. On the other hand, in some implementations that I know of, the floating-point processor is involved in executing some operations on what would probably be considered "integer" data; is it intended that those operations be counted or excluded? It may be that your best bet would be to rely on total time required to perform some lengthy computation (perhaps numerous iterations of some shorter computation), rather than number of operations as such. ----------------------------- End of UNIX-WIZARDS Digest **************************