however, other file descriptors, like those created with redirects, are not passed to unrelated child processes: for example, doing "cat > foo.txt & python" does not allow "python" to inherit the file descriptor for foo.txt.
So we need to figure out exactly how those file descriptors that colin is talking about are created.
Okay, so if the file descriptor is created with something like:
$ exec 5<whatever.txt
then this file descriptor *will* be inherited by subprocesses.
radix@lantern:~$ echo "hi" > foo.txt
radix@lantern:~$ exec 6<foo.txt
radix@lantern:~$ python -c 'import os; print os.read(6, 1024)'
hi
however, other file descriptors, like those created with redirects, are not passed to unrelated child processes: for example, doing "cat > foo.txt & python" does not allow "python" to inherit the file descriptor for foo.txt.
So we need to figure out exactly how those file descriptors that colin is talking about are created.