Opened 11 years ago

Closed 11 years ago

#7 closed task (fixed)

Port QProcess

Reported by: Dmitry A. Kuminov Owned by: Dmitry A. Kuminov
Priority: major Milestone: QtCore Beta
Component: QtCore Version: 4.5.1 Beta 1
Severity: Keywords:


Provide an OS/2 version of the QProcess class.

Change History (8)

comment:1 Changed 11 years ago by Dmitry A. Kuminov

Type: defecttask

comment:2 Changed 11 years ago by Dmitry A. Kuminov

Owner: set to Dmitry A. Kuminov
Status: newaccepted

comment:3 Changed 11 years ago by Dmitry A. Kuminov

QProcess takes some time. The code is a terrible mess of #ifdefs and unused members, very poor separation of platform independent and dependent code; the Qt3 incarnation was a bit cleaner AFAIR.

Note that I decided to not use a process monitor thread in order to monitor for availability of data/space in stdin/stdout/stderr pipes of the started process. In fact, the monitor code is too complex while such a precise level of notification doesn't seem to be really necessary. A timer that checks pipes every something milliseconds should do the job (Qt4/Win32 uses a 100 ms timer for that).

Or I can actually choose to use libc pipes instead of native pipes... In this case, we'll be able to use socket notifiers for instant notifications (as Qt/Unix? does) at (virtually) no cost because this functionality is already there. Will check this tomorrow.

comment:4 Changed 11 years ago by Silvan Scherrer

if possible i would vote for the libc implemantation. as i think socket notifiers are easyer to handle than loops for some checks.

comment:5 Changed 11 years ago by Dmitry A. Kuminov

Actually, a timer is a bit simpler than socket notifiers (whcih are in turn simpler than native OS/2 pipes with the event semaphore and a waiting thread) but you are right in that socket notifiers are the cleaner way to go than a timer "loop" and I recall that libc pipes in emx/kLIBC work very well and you can select() on them (I did some testing back then), so let's go that way.

The started native implementation will remain in r71 anyway so we will be able to return back to it if something goes wrong with libc.

comment:6 Changed 11 years ago by Dmitry A. Kuminov

Done QProcess using libc pipes in r72.

comment:7 Changed 11 years ago by Dmitry A. Kuminov

Together with r73 this may be considered as done (but not widely tested).

comment:8 Changed 11 years ago by Dmitry A. Kuminov

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.