Re: [Interest] QProcess unbuffered

2023-03-18 Thread Thiago Macieira
On Saturday, 18 March 2023 13:47:53 PDT Scott Bloom wrote: > Was that the core issue? Or it still isn’t working with the correct check > in? The content was there, it was just in the parent commit. So it ran when I executed it. The problem is that the CRT still did full buffering, didn't flush b

Re: [Interest] QProcess unbuffered

2023-03-18 Thread Scott Bloom
Was that the core issue? Or it still isn’t working with the correct check in? Scoitt -Original Message- From: Interest On Behalf Of Thiago Macieira Sent: Friday, March 17, 2023 6:54 PM To: interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered On Friday, 17 March 2023 14

Re: [Interest] QProcess unbuffered

2023-03-17 Thread Thiago Macieira
On Friday, 17 March 2023 14:00:54 PDT Scott Bloom wrote: > Maybe I missed it. But I don’t see where you use the InheritableHandleInfo > template. WTF? Ah, it ended up in the wrong commit in the series during rebase. Fixed. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software A

Re: [Interest] QProcess unbuffered

2023-03-17 Thread Scott Bloom
Maybe I missed it. But I don’t see where you use the InheritableHandleInfo template. -Original Message- From: Interest 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

Re: [Interest] QProcess unbuffered

2023-03-17 Thread Thiago Macieira
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

Re: [Interest] QProcess unbuffered

2023-03-08 Thread Scott Bloom
From: Björn Schäpers Sent: Wednesday, March 8, 2023 11:45 AM To: Scott Bloom ; interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered Am 08.03.2023 um 03:18 schrieb Scott Bloom: > I really want to thank Björn > > With his starting point, I was able to tweak his changes, an

Re: [Interest] QProcess unbuffered

2023-03-08 Thread Björn Schäpers
Am 07.03.2023 um 23:39 schrieb Thiago Macieira: On Tuesday, 7 March 2023 14:23:00 PST Björn Schäpers wrote: From the code I reviewed back then (and remember it now) it unpacks the handles directly to a HANDLE, which is pointer size (although it only uses the lower 32 bit). But Scott will tell

Re: [Interest] QProcess unbuffered

2023-03-08 Thread Björn Schäpers
Am 08.03.2023 um 03:18 schrieb Scott Bloom: 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 __att

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Scott Bloom
3 5:34 PM To: Scott Bloom ; Björn Schäpers ; interest@qt-project.org Subject: RE: [Interest] QProcess unbuffered Yeah, Im being dense.. its from the existing startupinfo.. I read that paragraph a dozen times and missed it each time -Original Message- From: Interest On Behalf O

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Scott Bloom
ch 7, 2023 12:58 PM To: Scott Bloom ; interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered So here is what I have: struct __attribute__((packed)) HackedHandlePasser { using HANDLE32 = std::int32_t; DWORD    NumberOfHandles = 3; // 4 Byte BYTE

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Scott Bloom
:58 PM To: Scott Bloom ; interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered So here is what I have: struct __attribute__((packed)) HackedHandlePasser { using HANDLE32 = std::int32_t; DWORD    NumberOfHandles = 3; // 4 Byte BYTE FlagsPerHandle[3];

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Scott Bloom
-Original Message- From: Interest On Behalf Of Thiago Macieira Sent: Tuesday, March 7, 2023 2:40 PM To: interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered On Tuesday, 7 March 2023 14:23:00 PST Björn Schäpers wrote: > From the code I reviewed back then (and remem

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Thiago Macieira
On Tuesday, 7 March 2023 14:23:00 PST Björn Schäpers wrote: > From the code I reviewed back then (and remember it now) it unpacks the > handles directly to a HANDLE, which is pointer size (although it only uses > the lower 32 bit). But Scott will tell us what the field width has to be > for a 64 b

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Björn Schäpers
That's right. It depends on the runtime, but I have not seen a process which uses not a Microsoft provided runtime (of course I didn't check all the programs I used). And that's all I've found. It serves my purposes to the fullest. From the code I reviewed back then (and remember it now) it un

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Thiago Macieira
[quoting out of order] On Tuesday, 7 March 2023 12:57:59 PST Björn Schäpers wrote: >startInf.cbReserved2 = sizeof(HackedHandlePasser); >startInf.lpReserved2 = reinterpret_cast(&handles); These reserved fields are how the runtimes "pass file descriptors" to child processes. This m

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Scott Bloom
@qt-project.org Subject: Re: [Interest] QProcess unbuffered So here is what I have: struct __attribute__((packed)) HackedHandlePasser { using HANDLE32 = std::int32_t; DWORD    NumberOfHandles = 3; // 4 Byte BYTE FlagsPerHandle[3];   // 3 * 1 Byte

Re: [Interest] QProcess unbuffered

2023-03-07 Thread Björn Schäpers
So here is what I have: struct __attribute__((packed)) HackedHandlePasser { using HANDLE32 = std::int32_t; DWORD    NumberOfHandles = 3; // 4 Byte BYTE FlagsPerHandle[3];   // 3 * 1 Byte HANDLE32 Handles[3];  // 3 * 4 Byte   };   static_as

Re: [Interest] QProcess unbuffered

2023-03-06 Thread Thiago Macieira
On Monday, 6 March 2023 12:17:39 PST Björn Schäpers wrote: > I had the exact same problem (but without QProcess). You have to use a trick > to disable the buffering, I don't know if its possible with QProcess, you > will have to use QProcess::CreateProcessArgumentModifier or most likely > CreatePro

Re: [Interest] QProcess unbuffered

2023-03-06 Thread Elvis Stansvik
Den mån 6 mars 2023 kl 21:21 skrev Scott Bloom : > > > > From: Björn Schäpers > Sent: Monday, March 6, 2023 12:18 PM > To: Scott Bloom ; interest@qt-project.org > Subject: Re: [Interest] QProcess unbuffered > > > > Am 06.03.2023 um 02:11 schrieb Scott Bloom:

Re: [Interest] QProcess unbuffered

2023-03-06 Thread Scott Bloom
From: Björn Schäpers Sent: Monday, March 6, 2023 12:18 PM To: Scott Bloom ; interest@qt-project.org Subject: Re: [Interest] QProcess unbuffered Am 06.03.2023 um 02:11 schrieb Scott Bloom: I have an external executable (mkvalidator from https://www.matroska.org/downloads/mkvalidator.html It

Re: [Interest] QProcess unbuffered

2023-03-06 Thread Björn Schäpers
Am 06.03.2023 um 02:11 schrieb Scott Bloom: I have an external executable (mkvalidator from https://www.matroska.org/downloads/mkvalidator.html It never flushes the output, and it uses linefeed without carriage returns to overwrite existing text on the output. The problem is, when I run i

Re: [Interest] QProcess unbuffered

2023-03-05 Thread Thiago Macieira
On Sunday, 5 March 2023 20:32:20 PST Bob Babcock wrote: > I haven't tested this, but what happens if you use QProcess to run >cmd /c mkvalidator ... > I suggest this because mkvalidator output isn't buffered when run in a .bat > file. You might lose return codes doing it this way. If you were

Re: [Interest] QProcess unbuffered

2023-03-05 Thread Bob Babcock
Scott Bloom wrote in news:BYAPR10MB309616B1C72EF13816384DA6A9B69__18000.3636678279$1678065097$ gmane$o...@byapr10mb3096.namprd10.prod.outlook.com: > --_000_BYAPR10MB309616B1C72EF13816384DA6A9B69BYAPR10MB3096namp_ > I have an external executable (mkvalidator from > https://www.matroska.org/downlo

Re: [Interest] QProcess unbuffered

2023-03-05 Thread Scott Bloom
On Sunday, 5 March 2023 17:11:13 PST Scott Bloom wrote: > I have an external executable (mkvalidator from > https://www.matroska.org/downloads/mkvalidator.html > > It never flushes the output, and it uses linefeed without carriage > returns to overwrite existing text on the output. You've descr

Re: [Interest] QProcess unbuffered

2023-03-05 Thread Thiago Macieira
On Sunday, 5 March 2023 17:11:13 PST Scott Bloom wrote: > I have an external executable (mkvalidator from > https://www.matroska.org/downloads/mkvalidator.html > > It never flushes the output, and it uses linefeed without carriage returns > to overwrite existing text on the output. You've describ

[Interest] QProcess unbuffered

2023-03-05 Thread Scott Bloom
I have an external executable (mkvalidator from https://www.matroska.org/downloads/mkvalidator.html It never flushes the output, and it uses linefeed without carriage returns to overwrite existing text on the output. The problem is, when I run it via QProcess (on windows, Qt 5.15.10), I get zer