On Tue, Oct 14, 2008 at 7:30 PM, <[EMAIL PROTECTED]> wrote: > OK, but considering >> A workaround to revive stdin on -ok is: -ok true \; -exec > Will you > A. Clamp down stdin on -exec too, for my own good; or > B. Mention the workaround on the man page; or > C. Stop clamping stdin on -ok, as people will just workaround it > anyway, and just say you will read up to a RET or whatever the shell > reads up to.
If people will just work around the problem anyway, perhaps a workaround doesn't need to be separately documented. The examples given in the findutils documentation are useful solutions to realistic problems, at least as far as possible. If you would like to propose an illustrative problem for which your workaround is the most effective solution, we can probably include that in the documentation as an example. > Does the shell choose to tinker with the stdin of the programs it calls? No, it leaves the disposition of all file handles (except, I guess, the history file) at the disposition of the user via its file redirection syntax. > So why should find(1)? Because it lacks a file redirection syntax, and probably doesn't need one. [ Eric Blake asks what to do for "-ok +" if it were implemented ] > Perhaps: we will save the chosen ones all up and run them at the very > end. I'm not sure that any benefit of having the feature would outweigh the maintenance burden of the more complex code, but I'm open to being persuaded. James.
