worley@compass.com (Dale Worley) (07/14/90)
I'm having trouble getting a Perl script to automatically start the interpreter via the #! mechanism. It appears to be sensitive to the length of the interpreter name I give in the #! line. I haven't seen anything like this in SunOS. Is there known to be some difficulty in Ultrix (V3.1 Rev. 9) with this feature? Dale Worley Compass, Inc. worley@compass.com -- I don't have to take this abuse from you -- I've got hundreds of people waiting to abuse me. -- Bill Murray, "Ghostbusters"
merlyn@iwarp.intel.com (Randal Schwartz) (07/14/90)
In article <1990Jul13.173130.571@uvaarpa.Virginia.EDU>, worley@compass (Dale Worley) writes: | I'm having trouble getting a Perl script to automatically start the | interpreter via the #! mechanism. It appears to be sensitive to the | length of the interpreter name I give in the #! line. I haven't seen | anything like this in SunOS. Is there known to be some difficulty in | Ultrix (V3.1 Rev. 9) with this feature? Remember. Ultrix is not UNIX! (yuck yuck) First off, I'll assume you know about 32-char maximum, since you mention SunOS already. Thus, I presume you ran into the stupid stupid problem that I did... that symlinks in the command name are *expanded* *within* that 32-char limitation *only* under Ultrix! Gack! Under SunOS, for example, you can: ln -s /some/humongously/long/path/name/to/somewhere /tmp/foo and run a script that begins: #!/tmp/foo script here but try to run the *same* thing on Ultrix, and you get something like: /some/humongously/long/path/nam not found Grrrrr. Double grrrrrr. Does this answer it? Even if it doesn't, this message should make others aware of such an awful problem. I ran across it because I wanted to symlink my /local/usr/bin on the VAXen to /base/vax-ultrix3/local/usr/bin, and the path is a wee bit too long. Had to shorten it to /base/vax-3/local/usr/bin, and even then I had to make a symlink from tp to taintperl so that I could put /local/usr/bin/tp in my scripts (for some "illegal" setuid scripts that I have). print "just another Perl hacker, a wee bit too long..." -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/
worley@compass.com (Dale Worley) (07/16/90)
X-Name: Randal Schwartz Thus, I presume you ran into the stupid stupid problem that I did... that symlinks in the command name are *expanded* *within* that 32-char limitation *only* under Ultrix! Gack! Gag me with a VAX! How can the kernel handle symlinks correctly for ordinary file opens and screw it up for #!s??? Dale Worley Compass, Inc. worley@compass.com -- Cyberspace, in its present condition, has a lot in common with the 19th Century West. It is vast, unmapped, culturally and legally ambiguous, verbally terse (unless you happen to be a court stenographer), hard to get around in, and up for grabs. Large institutions already claim to own the place, but most of the actual natives are solitary and independent, sometimes to the point of sociopathy. It is, of course, a perfect breeding ground for both outlaws and new ideas about liberty. -- John Perry Barlow
merlyn@iwarp.intel.com (Randal Schwartz) (07/17/90)
In article <1990Jul16.162054.10019@uvaarpa.Virginia.EDU>, worley@compass (Dale Worley) writes: | | X-Name: Randal Schwartz | | Thus, I presume you ran into the stupid stupid problem | that I did... that symlinks in the command name are *expanded* *within* | that 32-char limitation *only* under Ultrix! Gack! | | Gag me with a VAX! How can the kernel handle symlinks correctly for | ordinary file opens and screw it up for #!s??? It does, and it still does under 3.1 (we tested it after I posted). They probably don't even know of it as a problem yet. (They would probably just give me a workaround anyway: "put your files in directories with shorter names". Yuck.) As I said, Ultrix is not UNIX (but closer than HP-UX or AIX, apparently). Without testing I'd venture a guess that the symlink expansion is also happening for ordinary file lookups, which means you could run out of a buffer there too, although the buffer is probably 1K or larger. 32 bytes is pretty tight. But what does this have to do with Perl now? Probably not much. Just another UNIX hacker with a Perl bent, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/
evans@decvaxdec.com (Marc Evans) (07/17/90)
In article <1990Jul16.175554.28208@iwarp.intel.com>, merlyn@iwarp.intel.com (Randal Schwartz) writes: |> It does, and it still does under 3.1 (we tested it after I posted). |> They probably don't even know of it as a problem yet. (They would |> probably just give me a workaround anyway: "put your files in |> directories with shorter names". Yuck.) As I said, Ultrix is not |> UNIX (but closer than HP-UX or AIX, apparently). I just tested this under ULTRIX 4.0 (the one which is going to be shipped to DEC customers real soon). It is still there. I have submitted a QAR against it, but I personally doubt that it will be fixed very soon. I'll see if I can remember to pass word along when I hear something about its status... - Marc =========================================================================== Marc Evans - WB1GRH - evans@decvax.DEC.COM | Synergytics (603)635-8876 Unix and X Software Contractor | 21 Hinds Ln, Pelham, NH 03076 ===========================================================================