Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Double redirection in command substitution causes shell hang #784

Open
vmihalko opened this issue Sep 16, 2024 · 0 comments
Open

Comments

@vmihalko
Copy link

Reproducer

#!/usr/bin/env ksh

BugFunction() {
  { echo "funA" >&2; } >&2
  echo A
}

NoBugFunction() {
  echo "funB" >&2; >&2
  echo B
}

Result=$(BugFunction)
echo $Result
Result2=$(NoBugFunction)
echo $Result2

Steps to reproduce

$ ./arch/linux.i386-64/bin/ksh test.ksh 
funA

funB
B

KSH version

sh (AT&T Research) 93u+m/1.1.0-alpha+7170ac01 2024-08-28

What happens

Double redirection seems to cause a hang or unexpected behavior.

Git Bisect

I've tracked the bug to a specific commit: 2d4a787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant