9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: lucio@proxima.alt.za
To: 9fans@9fans.net
Subject: [9fans] #! scripts
Date: Thu,  9 Apr 2009 20:28:52 +0200	[thread overview]
Message-ID: <fe2e928b500f34dc0165f1e241440487@proxima.alt.za> (raw)

I'm messing around with /sys/src/9/port/sysproc.c and I may have
distorted it beyond recovery, but I have a feeling this problem isn't
of my own making.

I have:

	; cat /bin/ll
	#!/bin/ls -l
	;

If I invoke ll
	; ll
	--rwxrwxr-x M 9 lucio lucio 13 Jan 31 09:30 /bin/ll
	;

no matter where I invoke it, not what I expect at all.  I also have
(my prompt is actually "term% ", in case it matters):

	; cat /bin/en
	#!/bin/echo -n
	; en
	/bin/en;

Now, the question that makes this all very strange is: how does
/rc/bin/service/tcp17010 which contains:

	#!/bin/cpu -R

actually manage to work?  I have broken it during the course of today,
but using 9pccpu.gz off sources as I did now for confirmation, it
seems to work.

In summary, I think sysproc.c:/^sysexec is doing something wrong with
the script header line.  It is rather confusing code and I'm sure it
was more robust last time I messed with it, probably over a year ago.
I plan to fix it, but I need to understand what's broken first, and
that bit I'm finding hard to do.

Could someone with a stable version of Plan 9 please confirm that it
isn't my mind that has suddenly slipped?

++L

PS: invoking

	; ll .

may give an clearer view of the nature of the problem.




             reply	other threads:[~2009-04-09 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 18:28 lucio [this message]
2009-04-09 18:40 ` Richard Miller
2009-04-09 18:56   ` lucio
  -- strict thread matches above, loose matches on Subject: below --
2005-02-09 13:33 [9fans] scripts Steve Simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe2e928b500f34dc0165f1e241440487@proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).