Reputation: 13
I start two apps in linux such as A | B,so that the output of A will be redirected to B by pipe. When i kill B,it will generate a SIGPIPE,and I want to keep A alive and restart B,so that the output of A can still be redirected to B. How can I achieve it,dynamic pipe? Thanks.
Upvotes: 1
Views: 72
Reputation: 123490
Just keep the pipe open and restart B
when it dies:
A | while true; do B; done
Upvotes: 2