On Fri, 30 Jul 2004, Paul Eggert wrote: > [EMAIL PROTECTED] writes: > > > Would it be safe to put in a check that says if stdout is the output, that > > it could safely not create temp files? > > I don't think so. Consider the following somewhat-contrived example: > > sort -m -o - f1 f2 1<>f1 > > Here standard output points to the start of the regular file "f1". > If "sort" doesn't copy f1 before writing to standard output, it > will trash its input before reading it.
Yes, you're right of course. I hadn't thought of that. > Could you please try the following patch instead? If it solves your > problem, we're done, as it has already been installed in CVS > coreutils. If not, I'd like to know more about your problem, e.g., a > test case. Thanks. > > http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00076.html This is exactly what I need actually. I was trying to think of a patch would still allow for the STDIN check. My apologies for not looking more thoroughly through the mailing lists. I missed that thread. Thanks for your help. Stan _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
