Juli Mallett wrote: > > The fix works by substituting "" for NULL before this happens, > > but *after* the output file names have been created, to avoid > > creating files with a bogus prefix name. > > Personally, I'd rather see it be: > if (infile == NULL) > infile = "-"; > > As that's how we tend to represent stdin, yes?
The value represents the prefix value in the openlog(3) call in the generated code, as well as a prefix value for the name generation of the files. It is correct to not put a prefix value in there at all when using "stdin". The alternative is: openlog( "-", ...) and the name of the files beginning with "-", e.g.: -.h -_xdr.c -_svc.c -_clnt.c -_tbl.i IMO, that would be Bad(tm). Technically, it's bad mojo to use stdin as the input to rpcgen, unless you plan on hacking the resulting code anyway. Since the first crash is in the openlog/syslog generation code, I felt it was better to have an empty ident prefix value, than a bogus one. The resulting output naming conventions for everything end up the same as if the "-b" were specified, rather than core dumping. If you feel strongly about this, though, feel free to set the string to whatever bogus value you want, instead of the one that makes the output compatable with that before the change that broke things went in. The canonically correct fix would most likely be to: o Add a new "-p" option to specify the prefix value o Require the use of the "-p" when using stdin as the source for the rpcgen command o Refactor the code, so that the derivation of the prefix occurs only once, and the derived prefix is passed around, either from the "-p", or from the "infile", up to the rightmost period That's a lot of work for code that's probalby never going to be used in practice for most things, since "-b" will be required for backward compatability with previous versions of FreeBSD for, say, NFS. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message