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.