[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] rnews not working in pipe.




It looks like the reason rnews doesn't work in a pipe is this code in
storearticle in artutil.c.

      if ( ( infile = fopen( filename, "r" ) ) == NULL ) 
        return;

It's trying to open stdin again. When I change this to 

    if (strcmp(filename, "stdin") != 0) {
      if ( ( infile = fopen( filename, "r" ) ) == NULL ) 
        return;
    } else
      infile = stdin;

to not do the open again it works ok.

Greg Weeks
-- 
http://durendal.tzo.com/greg/


-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list