summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-10-22 21:17:47 +0000
committerCharles.Forsyth <devnull@localhost>2008-10-22 21:17:47 +0000
commit1bc0e0d583f076e6dd04193c4b38c6a1e8907ba9 (patch)
tree30833f3701fe7bdca39291bee06b48a92555461c
parentbb0454063029bcd36bb713dc95bbce4c4fa43510 (diff)
20081022-2217
-rw-r--r--appl/cmd/man2html.b2
-rw-r--r--appl/cmd/sh/sh.b22
-rw-r--r--appl/cmd/sh/sh.y22
-rw-r--r--dis/man2html.disbin15942 -> 15943 bytes
-rw-r--r--dis/sh.disbin41135 -> 41262 bytes
-rw-r--r--dis/sh/sh.disbin41135 -> 41262 bytes
-rw-r--r--include/version.h2
-rw-r--r--man/2/sys-0intro22
8 files changed, 51 insertions, 19 deletions
diff --git a/appl/cmd/man2html.b b/appl/cmd/man2html.b
index c3e6cc63..116fb590 100644
--- a/appl/cmd/man2html.b
+++ b/appl/cmd/man2html.b
@@ -35,7 +35,7 @@ tspec := array [] of { Troffspec
("fl", "fl"),
("Fi", "ffi"),
("ru", "_"),
- ("em", "&#173;"),
+ ("em", "&#8212;"),
("14", "&#188;"),
("12", "&#189;"),
("co", "&#169;"),
diff --git a/appl/cmd/sh/sh.b b/appl/cmd/sh/sh.b
index 05a8227a..7cd69cb0 100644
--- a/appl/cmd/sh/sh.b
+++ b/appl/cmd/sh/sh.b
@@ -221,7 +221,7 @@ system(drawctxt: ref Draw->Context, cmd: string): string
return Context.new(drawctxt).run(ref Listnode(n, nil) :: nil, 0);
} exception e {
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
@@ -232,7 +232,7 @@ run(drawctxt: ref Draw->Context, argv: list of string): string
return Context.new(drawctxt).run(stringlist2list(argv), 0);
} exception e {
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
@@ -294,7 +294,7 @@ runfile(ctxt: ref Context, fd: ref Sys->FD, path: string, args: list of ref List
laststatus = walk(ctxt, n, 0);
} exception e2 {
"fail:*" =>
- laststatus = e2[5:];
+ laststatus = failurestatus(e2);
}
} else
laststatus = walk(ctxt, n, 0);
@@ -792,7 +792,7 @@ runexternal(ctxt: ref Context, args: list of ref Listnode, last: int): string
EPIPE =>
return EPIPE;
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
extstart := chan of int;
@@ -819,6 +819,16 @@ runexternal(ctxt: ref Context, args: list of ref Listnode, last: int): string
return err;
}
+failurestatus(e: string): string
+{
+ s := e[5:];
+ while(s != nil && (s[0] == ' ' || s[0] == '\t'))
+ s = s[1:];
+ if(s != nil)
+ return s;
+ return "failed";
+}
+
runhashpling(ctxt: ref Context, fd: ref Sys->FD,
path: string, argv: list of ref Listnode, last: int): string
{
@@ -1020,7 +1030,7 @@ waitfor(ctxt: ref Context, pids: list of int): string
(who, line, s) := parsewaitstatus(ctxt, string buf[0:n]);
if (s != nil) {
if (len s >= 5 && s[0:5] == "fail:")
- s = s[5:];
+ s = failurestatus(s);
else
diagnostic(ctxt, line);
}
@@ -1911,7 +1921,7 @@ builtin_run(ctxt: ref Context, args: list of ref Listnode, nil: int): string
} exception e {
"fail:*" =>
ctxt.pop();
- return e[5:];
+ return failurestatus(e);
}
}
diff --git a/appl/cmd/sh/sh.y b/appl/cmd/sh/sh.y
index 44984a1b..f6b27c22 100644
--- a/appl/cmd/sh/sh.y
+++ b/appl/cmd/sh/sh.y
@@ -286,7 +286,7 @@ system(drawctxt: ref Draw->Context, cmd: string): string
return Context.new(drawctxt).run(ref Listnode(n, nil) :: nil, 0);
} exception e {
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
@@ -297,7 +297,7 @@ run(drawctxt: ref Draw->Context, argv: list of string): string
return Context.new(drawctxt).run(stringlist2list(argv), 0);
} exception e {
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
@@ -362,7 +362,7 @@ runfile(ctxt: ref Context, fd: ref Sys->FD, path: string, args: list of ref List
laststatus = walk(ctxt, n, 0);
} exception e2 {
"fail:*" =>
- laststatus = e2[5:];
+ laststatus = failurestatus(e2);
}
} else
laststatus = walk(ctxt, n, 0);
@@ -884,7 +884,7 @@ runexternal(ctxt: ref Context, args: list of ref Listnode, last: int): string
EPIPE =>
return EPIPE;
"fail:*" =>
- return e[5:];
+ return failurestatus(e);
}
}
extstart := chan of int;
@@ -911,6 +911,16 @@ runexternal(ctxt: ref Context, args: list of ref Listnode, last: int): string
return err;
}
+failurestatus(e: string): string
+{
+ s := e[5:];
+ while(s != nil && (s[0] == ' ' || s[0] == '\t'))
+ s = s[1:];
+ if(s != nil)
+ return s;
+ return "failed";
+}
+
runhashpling(ctxt: ref Context, fd: ref Sys->FD,
path: string, argv: list of ref Listnode, last: int): string
{
@@ -1119,7 +1129,7 @@ waitfor(ctxt: ref Context, pids: list of int): string
(who, line, s) := parsewaitstatus(ctxt, string buf[0:n]);
if (s != nil) {
if (len s >= 5 && s[0:5] == "fail:")
- s = s[5:];
+ s = failurestatus(s);
else
diagnostic(ctxt, line);
}
@@ -2049,7 +2059,7 @@ builtin_run(ctxt: ref Context, args: list of ref Listnode, nil: int): string
} exception e {
"fail:*" =>
ctxt.pop();
- return e[5:];
+ return failurestatus(e);
}
}
diff --git a/dis/man2html.dis b/dis/man2html.dis
index ce64b9ea..ca1ed59a 100644
--- a/dis/man2html.dis
+++ b/dis/man2html.dis
Binary files differ
diff --git a/dis/sh.dis b/dis/sh.dis
index 4594e096..687c1ca2 100644
--- a/dis/sh.dis
+++ b/dis/sh.dis
Binary files differ
diff --git a/dis/sh/sh.dis b/dis/sh/sh.dis
index 4594e096..687c1ca2 100644
--- a/dis/sh/sh.dis
+++ b/dis/sh/sh.dis
Binary files differ
diff --git a/include/version.h b/include/version.h
index c4756491..3d88292a 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1 +1 @@
-#define VERSION "Fourth Edition (20081019)"
+#define VERSION "Fourth Edition (20081022)"
diff --git a/man/2/sys-0intro b/man/2/sys-0intro
index ba17c3ea..a9d912e9 100644
--- a/man/2/sys-0intro
+++ b/man/2/sys-0intro
@@ -88,7 +88,7 @@ see
.IR namespace (4).
.PP
The operating system kernel records the file name used to access each open file or directory.
-If the file is opened by a local name (one that does not begin
+If the file is opened by a relative path name (one that does not begin
.B /
or
.BR # ),
@@ -100,8 +100,8 @@ Similar lexical adjustments are made for path names containing
.B ..
(dot-dot).
By this process, the system maintains a record of the route by which each file was accessed.
-Although there is a possibility for error\(emthe name is not maintained after the file is opened,
-so removals and renamings can confound it\(emthis simple method usually
+Although there is a possibility for error—the name is not maintained after the file is opened,
+so removals and renamings can confound it—this simple method usually
permits the system to return, via
.IR sys-fd2path (2)
and related calls such as those of
@@ -113,6 +113,18 @@ or the
.B ns
file of
.IR prog (3).
+.PP
+Inferno gives special meaning in path names only to `/' and an initial `#',
+but individual file servers might impose further restrictions or conventions of their own.
+For instance, the set of characters allowed in names by
+.IR fs (3)
+ultimately depends on the host operating system;
+and
+.IR dial (2)
+and
+.IR cs (8)
+amongst others use `!' as a delimiter in network names,
+preventing their use in the names of network devices.
.SS "File I/O"
Files are opened for input or output
by
@@ -133,7 +145,7 @@ and
.IR sys-read (2)).
When the last reference to an
.B FD
-disappears, the file descriptor is released\(emclosed, in Unix parlance.
+disappears, the file descriptor is released—closed, in Unix parlance.
The
.B FD
contains an integer file descriptor, similar to those in Unix, but the
@@ -297,7 +309,7 @@ and
A comparison of process and file identities take place when a process
attempts to open or create a file.
.PP
-When a pathname crosses from one server to another the process identities are
+When a path name crosses from one server to another the process identities are
mapped by each server receiving a file request.
.PP
The