rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 77b18786228a8cf9f58aee09677440c61dc218a9
parent 2e67f638ea031ce0138891b6356806b463f5e9af
Author: Toby Goodwin <tjg@star.le.ac.uk>
Date:   Wed, 19 Jun 2002 16:12:04 +0100

release: rc-1.7

Diffstat:
MCOPYING | 2+-
MChangeLog | 4++++
MINSTALL | 13+++++++++----
MREADME | 2+-
Mconfigure.ac | 2+-
Mexec.c | 2--
Amkstatval.c | 26++++++++++++++++++++++++++
Mrc.1 | 16+++++++++++++---
Mrc.h | 7-------
Mvar.c | 3---
Mwait.c | 2++
11 files changed, 57 insertions(+), 22 deletions(-)

diff --git a/COPYING b/COPYING @@ -1,5 +1,5 @@ /* - * Copyright 1991 by Byron Rakitzis. All rights reserved. + * Copyright 1991, 2001, 2002 by Byron Rakitzis. All rights reserved. * * This software is not subject to any license of the American Telephone * and Telegraph Company or of the Regents of the University of California. diff --git a/ChangeLog b/ChangeLog @@ -784,3 +784,7 @@ Changes since rc-1.5b2 Documentation: possible warning in tripping.c (thanks Dan Moniz). Release: rc-1.6c7. + +2002-06-18 + + Release: rc-1.7. diff --git a/INSTALL b/INSTALL @@ -21,10 +21,11 @@ libraries. For a summary of all options, run `sh configure --help'. You can specify Makefile variables by setting the corresponding environment variables. For example, you might want to set `CC=cc', to -prevent configure looking for gcc, or set an initial value for `LIBS', -as in the example below. It is a good idea to specify static linking -(unless you are linking against a dynamic readline library)---if you are -using gcc, you can do this by setting `CFLAGS=-static'. +prevent configure looking for gcc, or set an initial value for +`LDFLAGS', as in the example below. It is a good idea to specify +static linking (unless you are linking against a dynamic readline +library)---if you are using gcc, you can do this by setting +`CFLAGS=-static'. Here are the configure options you may want to use, in approximately descending order of usefulness. @@ -135,6 +136,10 @@ trip' to do this. This will produce some output, and should end with "trip is complete". If the trip instead ends with "trip took a wrong turn..." please contact the maintainer. +In this release, `make trip' will fail on a file system which does not +implement Unix semantics (specifically permissions bits). This means +that `make trip' is not useful under CygWin, for instance. + LARGE FILE SUPPORT diff --git a/README b/README @@ -1,4 +1,4 @@ -This is release candidate rc-1.6c7. +This is release rc-1.7. See COPYING for copying information. All files are diff --git a/configure.ac b/configure.ac @@ -8,7 +8,7 @@ dnl Automake stuff. dnl Use this one for snapshots... dnl AM_INIT_AUTOMAKE(rc, 1.6s`echo $RELDATE |sed 's/-//g'`) dnl ...and this one for releases -AM_INIT_AUTOMAKE(rc, 1.6c7) +AM_INIT_AUTOMAKE(rc, 1.7) AM_CONFIG_HEADER(config.h) diff --git a/exec.c b/exec.c @@ -7,8 +7,6 @@ #include "wait.h" -#include "rc.h" -#include "wait.h" /* Takes an argument list and does the appropriate thing (calls a builtin, calls a function, etc.) diff --git a/mkstatval.c b/mkstatval.c @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <unistd.h> + +int main(void) { + int cstatus, pstatus; + pid_t pid; + + for (cstatus = 0; cstatus < 2; ++cstatus) { + switch (pid = fork()) { + case -1: + perror("fork"); + return 1; + case 0: + _exit(cstatus); + default: + if (wait(&pstatus) != pid) { + perror("wait"); + return 1; + } + printf("#define STATUS%d %d\n", cstatus, pstatus); + } + } + return 0; +} diff --git a/rc.1 b/rc.1 @@ -161,7 +161,7 @@ .if !"\\$4"" .Xf \\$2 \\$1 "\\$3\\f\\$1\\$4\\*(Xi" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" .if "\\$4"" \\$3\fR\s10 .. -.TH RC 1 "2002-05-21" +.TH RC 1 "2002-06-18" .SH NAME rc \- shell .SH SYNOPSIS @@ -1135,7 +1135,8 @@ operator: .De .PP This is useful when the normal list concatenation rules need to be -bypassed. For example, to append a single period at the end of +bypassed. +For example, to append a single period at the end of .Cr $path , use: .Ds @@ -1413,7 +1414,8 @@ If the command exited with a numeric value, that number is the status. If the command died with a signal, the status is the name of that signal; if a core file was created, the string .Rc `` +core '' -is appended. The value of +is appended. +The value of .Cr $status for a pipeline is a list, with one entry, as above, for each process in the pipeline. @@ -1694,6 +1696,10 @@ For example: .TP \& disables core dumps. +To set a soft limit equal to the hard limit: +.Ds +.Cr "limit `{limit -h datasize}" +.De .TP .B newpgrp Puts @@ -2043,6 +2049,10 @@ The redundant inner parentheses must be omitted. .PP Variable subscripting cannot be used in here documents. .PP +The +.Cr limit +builtin silently ignores extra arguments. +.PP Bug reports should be mailed to .Cr "<tjg@star.le.ac.uk>" . .SH INCOMPATIBILITIES diff --git a/rc.h b/rc.h @@ -202,13 +202,6 @@ extern void exec(List *, bool); extern int my_execve(char *, char **, char **); #endif -#if HASH_BANG -#define rc_execve execve -#else -/* execve.c */ -extern int my_execve(char *, char **, char **); -#endif - /* footobar.c */ extern char **list2array(List *, bool); extern char *get_name(char *); diff --git a/var.c b/var.c @@ -58,9 +58,6 @@ extern bool varassign_string(char *extdef) { associated with $status) */ -static List id2 = { "$Release: @(#)" PACKAGE " " VERSION " " RELDATE " $", 0, 0 }; -static List id1 = { VERSION, 0, &id2 }; - extern List *varlookup(char *name) { Variable *look; List *ret, *l; diff --git a/wait.c b/wait.c @@ -1,3 +1,5 @@ +#include "rc.h" + #include <errno.h> #include "wait.h"