Maybe I missed it. But I don’t see where you use the InheritableHandleInfo template.
-----Original Message----- From: Interest <interest-boun...@qt-project.org> On Behalf Of Thiago Macieira Sent: Friday, March 17, 2023 1:45 PM To: interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered 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 _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest