aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/rc/io.c7
-rw-r--r--src/cmd/rc/io.h6
-rw-r--r--src/cmd/rc/plan9ish.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/src/cmd/rc/io.c b/src/cmd/rc/io.c
index cf143b0f..61256102 100644
--- a/src/cmd/rc/io.c
+++ b/src/cmd/rc/io.c
@@ -126,10 +126,13 @@ void flush(io *f)
}
}
io *openfd(int fd){
- io *f=new(struct io);
+ io *f;
+fprint(2, "in openfd\n");
+ f=new(struct io);
f->fd=fd;
f->bufp=f->ebuf=f->buf;
f->strp=0;
+fprint(2, "in openfd\n");
return f;
}
io *openstr(void){
@@ -155,6 +158,7 @@ io *opencore(char *s, int len)
Memcpy(buf, s, len);
return f;
}
+/*
void rewind(io *io)
{
if(io->fd==-1) io->bufp=io->strp;
@@ -163,6 +167,7 @@ void rewind(io *io)
Seek(io->fd, 0L, 0);
}
}
+*/
void closeio(io *io)
{
if(io->fd>=0) close(io->fd);
diff --git a/src/cmd/rc/io.h b/src/cmd/rc/io.h
index 92a439e5..ec511871 100644
--- a/src/cmd/rc/io.h
+++ b/src/cmd/rc/io.h
@@ -1,3 +1,9 @@
+/*
+ * on Mac OS X, err is something else,
+ * and assigning to it causes a bus error.
+ * what a crappy linker.
+ */
+#define err rc_err
#define EOF (-1)
#define NBUF 512
struct io{
diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c
index abb66cc3..6e9d59f1 100644
--- a/src/cmd/rc/plan9ish.c
+++ b/src/cmd/rc/plan9ish.c
@@ -400,8 +400,8 @@ notifyf(void *unused0, char *s)
if(strncmp(s, "sys: ", 5)!=0) interrupted=1;
goto Out;
}
-
- pfmt(err, "rc: note: %s\n", s);
+ if(strcmp(s, "sys: child") != 0)
+ pfmt(err, "rc: note: %s\n", s);
noted(NDFLT);
return;
Out: