Opened 15 years ago
Closed 15 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: | ||
Cc: |
Description
Provide an OS/2 version of the QProcess class.
Change History (8)
comment:1 by , 15 years ago
Type: | defect → task |
---|
comment:2 by , 15 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:3 by , 15 years ago
comment:4 by , 15 years ago
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 by , 15 years ago
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:7 by , 15 years ago
Together with r73 this may be considered as done (but not widely tested).
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
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.