Actually grep was intended as a trivial example of something someone might run in exec after forking with reference to a FD that the parent opened. We don't actually need to grep the passwd file, I just wanted a simple example to show what was not working for us. $^F was the solution.
In reply to Re^2: Leaking a file descriptor into a child to use with /proc/self/fd/3
by ewheeler
in thread Leaking a file descriptor into a child to use with /proc/self/fd/3
by ewheeler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |