Re: [PATCH] mingw: workaround for hangs when sending STDIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13.02.2020 19:56, Eric Sunshine wrote:
    clogged while it's trying to deal with 8MB of STDIN. Such deadlocks
    could  be defeated with writing less then pipe's buffer size per

s/then/than/

    of pending reads. Therefore, if buffer is bigger then size of reads,

s/then/than/

+test_expect_success 'stash handles large files' '
+       printf "%1023s\n%.0s" "x" {1..16384} >large_file.txt &&
+       git stash push --include-untracked -- large_file.txt
+'

Use of {1..16384} is not portable across shells. You should be able to
achieve something similar by assigning a really large value to a shell
variable and then echoing that value to "large_file.txt". Something
like:

     x=0123456789
     x=$x$x$x$x$x$x$x$x$x$x
     x=$x$x$x$x$x$x$x$x$x$x
     ...and so on...
     echo $x >large_file.txt &&

or any other similar construct.

Thanks for having a look! I will address these in V2 next week.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux