• fix for the pipeline-as-coprocess problem
• bump to mksh R32
This commit is contained in:
parent
84e78bcfb6
commit
2ca968e25f
18
check.t
18
check.t
|
@ -1,4 +1,4 @@
|
|||
# $MirOS: src/bin/mksh/check.t,v 1.141 2007/10/18 20:32:31 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.142 2007/10/25 13:51:18 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
|
@ -7,7 +7,7 @@
|
|||
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R31 2007/10/18
|
||||
@(#)MIRBSD KSH R32 2007/10/25
|
||||
description:
|
||||
Check version of shell.
|
||||
category: pdksh
|
||||
|
@ -3851,7 +3851,7 @@ expected-stdout:
|
|||
posix
|
||||
brex
|
||||
---
|
||||
name: pipeline-subshell-1
|
||||
name: pipeline-1
|
||||
description:
|
||||
pdksh bug: last command of a pipeline is executed in a
|
||||
subshell - make sure it still is, scripts depend on it
|
||||
|
@ -3877,6 +3877,18 @@ expected-stdout:
|
|||
*
|
||||
abcx abcy
|
||||
---
|
||||
name: pipeline-2
|
||||
description:
|
||||
check that co-processes work with TCOMs, TPIPEs and TPARENs
|
||||
stdin:
|
||||
"$0" -c 'i=100; print hi |& while read -p line; do print "$((i++)) $line"; done'
|
||||
"$0" -c 'i=200; print hi | cat |& while read -p line; do print "$((i++)) $line"; done'
|
||||
"$0" -c 'i=300; (print hi | cat) |& while read -p line; do print "$((i++)) $line"; done'
|
||||
expected-stdout:
|
||||
100 hi
|
||||
200 hi
|
||||
300 hi
|
||||
---
|
||||
name: persist-history-1
|
||||
description:
|
||||
Check if persistent history saving works
|
||||
|
|
6
jobs.c
6
jobs.c
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.29 2007/10/25 13:27:00 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.30 2007/10/25 13:51:18 tg Exp $");
|
||||
|
||||
/* Order important! */
|
||||
#define PRUNNING 0
|
||||
|
@ -432,8 +432,10 @@ exchild(struct op *t, int flags, /* used if XPCLOSE or XCCLOSE */ int close_fd)
|
|||
tty_close();
|
||||
cleartraps();
|
||||
execute(t, (flags & XERROK) | XEXEC); /* no return */
|
||||
internal_warningf("exchild: execute() returned");
|
||||
#ifndef MKSH_SMALL
|
||||
if (t->type == TPIPE)
|
||||
unwind(LLEAVE);
|
||||
internal_warningf("exchild: execute() returned");
|
||||
fptreef(shl_out, 2, "exchild: tried to execute {\n%T\n}\n", t);
|
||||
shf_flush(shl_out);
|
||||
#endif
|
||||
|
|
12
mksh.1
12
mksh.1
|
@ -1,7 +1,7 @@
|
|||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.103 2007/10/18 20:32:32 tg Exp $
|
||||
.\" $MirOS: src/bin/mksh/mksh.1,v 1.104 2007/10/25 13:51:18 tg Exp $
|
||||
.\" $OpenBSD: ksh.1,v 1.120 2007/05/31 20:47:44 otto Exp $
|
||||
.\"
|
||||
.Dd October 18, 2007
|
||||
.Dd October 25, 2007
|
||||
.Dt MKSH 1
|
||||
.Os MirBSD
|
||||
.Sh NAME
|
||||
|
@ -5399,11 +5399,3 @@ mailing list or in the
|
|||
.Pq or Li \&#ksh
|
||||
IRC channel at
|
||||
.Pa irc.freenode.net:6667 .
|
||||
.Pp
|
||||
By the way, the snippet
|
||||
.Bd -literal -offset indent
|
||||
$ print hi \*(Ba read a; print $a # Does not show hi
|
||||
.Ed
|
||||
.Pp
|
||||
does not work, because commands of a pipe sequence are executed in
|
||||
a subshell (but you can usually use co-processes instead of pipes).
|
||||
|
|
4
sh.h
4
sh.h
|
@ -8,8 +8,8 @@
|
|||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.178 2007/10/18 20:32:33 tg Exp $"
|
||||
#define MKSH_VERSION "R31 2007/10/18"
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.179 2007/10/25 13:51:19 tg Exp $"
|
||||
#define MKSH_VERSION "R32 2007/10/25"
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
|
|
Loading…
Reference in New Issue