[Interest] QProcess unbuffered

Thiago Macieira thiago.macieira at intel.com
Fri Mar 17 21:45:24 CET 2023


On Tuesday, 7 March 2023 18:18:53 PDT Scott Bloom wrote:
> I really want to thank Björn
> 
> With his starting point, I was able to tweak his changes, and seem to have
> it working 😊 I have more testing to do. But it was actually pretty
> straight forward.
> 
> * I use VS (2022) so the packing was different
>         __attribute__((packed)) became  __pragma( pack( push, 1 ) ) struct
> HackedHandlePasser * The handles are 64 bit in the existing Startup Info,
> so I kept them as such, which changed the definition of HANDLE32 using
> HANDLE32 = std::int32_t; was removed, and the standard HANDLE defined in
> windows.h was used * The static assert was updated to reflect this
> * I copy all 3 handles from the existing startupinfo
>        std::memcpy(&handles.Handles[0], &invalid, 4);
>        std::memcpy(&handles.Handles[1], &pipe.Write, 4);
>        std::memcpy(&handles.Handles[2], &pipe.Write, 4);
> 
>        became
> 
>         std::memcpy( &handles.Handles[ 0 ], &args->startupInfo->hStdInput,
> sizeof( HANDLE ) ); std::memcpy( &handles.Handles[ 1 ],
> &args->startupInfo->hStdOutput, sizeof( HANDLE ) ); std::memcpy(
> &handles.Handles[ 2 ], &args->startupInfo->hStdError, sizeof( HANDLE ) );

I'm trying to add this to QProcess but it's not behaving as expected on 
Windows.

https://codereview.qt-project.org/c/qt/qtbase/+/467281

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230317/34166cd5/attachment.bin>


More information about the Interest mailing list