pbr (01/19/83)
I found a problem with the 'ul' program. It ignores command line arguments if it thinks the user is on a dumb terminal and certain other conditions are met. It calls cat but forgets that argv has been incremented past the zeroth argument, therefore, cat doesn't see the filename and defaults to standard input. This is not a pretty solution, since it counts on the fact that cat does not care what it is called. But it is a very simple fix. If cat did look at the zeroth argument, it would think it was being called "ul". In any case, this is a bug that needs to be fixed. -Peter Reintjes duke!mcnc!pbr ************** file ul.c ******************* 58c58 < execv("/bin/cat",argv); --- > execv("/bin/cat",--argv); 79c79 < execv("/bin/cat",argv); --- > execv("/bin/cat",--argv);
jim (01/20/83)
I didn't notice the exec("cat") bug, but in the version of ul that came with our system there is no "argc--, argv++;" at the end of the while loop that parses the command line options. The program could not possibly have worked without it unless there were no options.