[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] What the process started by <() may not be a child?
From: |
Peng Yu |
Subject: |
[Help-bash] What the process started by <() may not be a child? |
Date: |
Thu, 15 Nov 2018 09:04:14 -0600 |
Hi,
I don't understand the difference between the two <(). Why the first
one is not a child but the second one is a child? Where is this
documented? If I do want to wait for both to be finished, is there a
way to do so in bash? Thanks.
$ cat ./main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
echo <(echo 1:$BASHPID>&2) <(echo 2:$BASHPID>&2)
echo "$!"
wait "$(($!-1))"
$ ./main.sh
1:38520
/dev/fd/63 /dev/fd/62
38521
2:38521
./main.sh: line 6: wait: pid 38520 is not a child of this shell
--
Regards,
Peng
- [Help-bash] What the process started by <() may not be a child?,
Peng Yu <=