Yeah, thats weird. I probably cheated on the way line is defined, and my compiler automagically fixed it. Instead of
char *line;
/* try */
char line[256];
C is very finicky about allocating space for strings, and will segfault without telling why. This is one of the primary reasons people like Perl over C.
Try this free book: Advanced Linux Programming and read the chapter on IPC.
The difference between my script and your's using &63, is that mine uses a named-pipe which can be accessed by different process. Using &63, you are using a shared filehandle referenced by it's fileno, and requires that both scripts share them..... that means 1 script must fork off the other, instead of them being started separately. Of course, I'm not an expert c programmer, so take that with a grain of salt. This isn't the place to discuss c anyways.
| [reply] [d/l] |