Opened 5 years ago

Closed 5 years ago

#7 closed task (fixed)

Port QProcess

Reported by: dmik Owned by: dmik
Priority: major Milestone: QtCore Beta
Component: QtCore Version: 4.5.1 Beta 1
Severity: Keywords:
Cc:

Description

Provide an OS/2 version of the QProcess class.

Change History (8)

comment:1 Changed 5 years ago by dmik

  • Type changed from defect to task

comment:2 Changed 5 years ago by dmik

  • Owner set to dmik
  • Status changed from new to accepted

comment:3 Changed 5 years ago by dmik

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 5 years ago by diver

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 5 years ago by dmik

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 5 years ago by dmik

Done QProcess using libc pipes in r72.

comment:7 Changed 5 years ago by dmik

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

comment:8 Changed 5 years ago by dmik

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.