1 Star 0 Fork 23

konglidong/gawk

forked from src-openEuler/gawk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Reorder-statements-in-iolint-to-try-to-eliminate-a-r.patch 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
邹林 提交于 2022-04-02 15:42 +08:00 . fix test case probabilistic fail
From e03c8822c48bedfe6cc7fbd5a9382d9630de6494 Mon Sep 17 00:00:00 2001
From: "Andrew J. Schorr" <aschorr@telemetry-investments.com>
Date: Tue, 7 Dec 2021 12:00:22 -0500
Subject: [PATCH] Reorder statements in iolint to try to eliminate a race
condition.
---
test/iolint.awk | 2 +-
test/iolint.ok | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/iolint.awk b/test/iolint.awk
index 042f743..3ebaf43 100644
--- a/test/iolint.awk
+++ b/test/iolint.awk
@@ -49,8 +49,8 @@ BEGIN {
# `%.*s' used for output pipe and two-way pipe
# Not doing |& due to race condition and signals. sigh
cat = "cat"
- print "hello" | "cat"
print "/bin/cat \"$@\"" > "cat"
+ print "hello" | "cat"
print close("cat")
print close("cat")
fflush()
diff --git a/test/iolint.ok b/test/iolint.ok
index 7a165aa..860bcfb 100644
--- a/test/iolint.ok
+++ b/test/iolint.ok
@@ -20,9 +20,9 @@ gawk: iolint.awk:42: warning: `echo hello' used for input pipe and output file
0
0
gawk: iolint.awk:53: warning: `cat' used for output file and output pipe
-0
hello
0
+0
gawk: iolint.awk:67: warning: `eval $CMD_TO_RUN' used for input pipe and output pipe
0
0
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/konglidong/gawk.git
git@gitee.com:konglidong/gawk.git
konglidong
gawk
gawk
master

搜索帮助