LENS

Files: Reading From Pipes


If you open a pipe for reading, as in the command:

    lens> loadExamples "| genex" -s "my set" -n 100
you could have a problem when the pipe is closed. A pipe might be closed if you read enough examples or if Lens exits. The problem is that the command started in the pipe, genex in this case, may not die and will continue to spew data. If the genex program was written in C, you can solve this problem by inserting the following call in its main() function:
    signal(SIGPIPE, SIG_DFL);
You may need to #include <signal.h> to do this.
Douglas Rohde
Last modified: Fri Nov 10 18.38:46 EST 2000