bug#6900: mktemp: want option to make a fifo

2010-08-23 Thread John Reiser
mktemp: Please add an option which creates a fifo instead of a file or a directory. "--fifo" seems appropriate, although the abbreviation "-f" might be confused as a request for an ordinary file; and "-p" as in "--pipe" is already taken for "prefix". --

bug#6900: mktemp: want option to make a fifo

2010-08-23 Thread John Reiser
On 08/23/2010 09:40 AM, Eric Blake wrote: > On 08/23/2010 09:22 AM, John Reiser wrote: >> mktemp: Please add an option which creates a fifo >> [snip] > > Thanks for the report. However, I'm inclined to mark this bug as a > duplicate of 6330, for the reasons al

bug#6900: mktemp: want option to make a fifo

2010-08-23 Thread John Reiser
On 08/23/2010 11:00 AM, Eric Blake wrote: [snip] > If we add 'mktemp --fifo', then where do we stop? What about creating a > uniquely named symlink? Or a new shared memory object? There are several possible answers to "Where do we stop?". 1) Stop at current code [no changes.] 2) Stop when us

bug#6900: mktemp: want option to make a fifo

2010-08-23 Thread John Reiser
On 08/23/2010 02:22 PM, Paul Eggert wrote: > On 08/23/2010 01:40 PM, John Reiser wrote: >> Two independent user requests [one of which >> includes code!] within a few months show a definite need. > > The two requests would have been more convincing if they demonstrated > a

bug#6900: mktemp: want option to make a fifo

2010-08-24 Thread John Reiser
On 08/24/2010 11:32 AM, Paul Eggert wrote: [snip] > Again, once things get this complicated, it doesn't cost any more > processes to use a temporary directory, with something like this: > > dir=$(mktemp -d dir.XX) > mkfifo $dir/1 $dir/2 > listener1 < $dir/1 > listener2 < $dir/2 > c

bug#6900: mktemp: want option to make a fifo

2010-08-24 Thread John Reiser
> (echo quit 1 | cmd1 3<&0 <&4) 4<&0 | > (: | cmd2 3<&0 <&4) 4<&0 When adopting this style, then remember to consider the possibility of closing the "extra" file descritpor (fd 4 here) to reduce the number of open files. If there are no 'trap', then also remember to consider the pos

bug#6900: pitfalls of recoding named fifo as pipe

2010-08-25 Thread John Reiser
On 08/24/2010 11:32 AM, Paul Eggert wrote: > dir=$(mktemp -d dir.XX) > mkfifo $dir/1 $dir/2 > listener1 < $dir/1 > listener2 < $dir/2 > cmd1 2> $dir/1 | cmd2 2> $dir/2 > Better yet, do not use named fifos, since pipes suffice: > > (cmd1 2>&1 >&3 | listener1) 3>&1 | > (cmd2 2>&1

bug#9620: dd: bogus behavior when interrupted

2011-09-27 Thread John Reiser
On 09/27/2011 12:33 PM, Paul Eggert wrote: > This happened with coreutils 8.13 on Fedora 14 x86-64 > (coreutils compiled with GCC 4.6.1). I interrupted > 'dd' with control-C, but it didn't respond right away; > instead, it churned away and created the entire output file, > issuing a bogus diagnost

bug#9612: sort: avoid a NaN-induced infloop

2011-09-27 Thread John Reiser
> Is there any way to compare the non-padding parts of long doubles? > There ought to be *some* way to get the fractional part of a NaN, no? frexp() [man 3 frexp] would be the right idea, except that it fails explicitly for NaN. --

bug#9734: [solaris] `dd if=/dev/urandom of=file bs=1024k count=1' gets a file of 133120 bytes

2011-10-12 Thread John Reiser
> I found this in the man page of /dev/urandom on Solaris: "The limitation per > read for /dev/random is 1040 bytes. The limit for /dev/urandom is (128 * > 1040 = 133120)." That seems to be the reason but I think dd should handle > that and check the return value of the read() system call and make

bug#13135: Loss of data while copying

2012-12-10 Thread John Reiser
On 12/10/2012 07:21 AM, Pádraig Brady wrote: >> On 12/10/2012 07:58 AM, Cojocaru Alexandru wrote: >>> bash$ yes $(for i in $(seq 1 10); do echo -n a; done) | dd of=big-lines >>> ibs=11 count=1 >>> 9924+76 records in The original poster should know better: the best bug reports include

bug#13135: Loss of data while copying

2012-12-10 Thread John Reiser
On 12/10/2012 10:03 AM, Eric Blake wrote: > On 12/10/2012 10:06 AM, John Reiser wrote: >>> Yes, because a count was specified, >>> dd will operate in its default awkward but POSIX specified mode >>> of counting each read() call, even if it returned less than spe