Opened 15 years ago
Closed 6 years ago
#85 closed enhancement (wontfix)
QProcess: Support P_SESSION
Reported by: | Dmitry A. Kuminov | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Qt 5 |
Component: | QtCore | Version: | 4.5.1 Beta 2 |
Severity: | medium | Keywords: | |
Cc: |
Description
Currently, the necessary P_SESSION and P_DETACH functionality in QProcess is implemented using workarounds which proxy the calls through "cmd.exe /c" (see #72). This is done so because kLIBC 0.6.3 doesn't support P_SESSION and P_DETACH.
Later, we plan to apply a patch to kLIBC that adds support for these execution modes and make use of them in QProcess. This defect is to track this plan.
Attachments (1)
Change History (8)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
BT, here is the original kLIBC defect http://svn.netlabs.org/libc/ticket/121.
Also, I'm attaching my current patch that adds P_SESSION support to the libc-0.6 branch of kLIBC. Note that the patch is a work in progress. P_SESSION works, inheritance works, but SIGCHLD and wait()/waitpid() won't work for processes started with P_SESSION yet. In order to implement that, we will most likely need a worker thread that will watch the system queue attached to the children created in separate sessions and deliver SIGCHILD when they die as well as provide wait()/waitpid() support.
comment:3 by , 15 years ago
Priority: | major → minor |
---|---|
Severity: | → medium |
comment:4 by , 15 years ago
Actually, I reimplemented QProcess::startDetached() in r484 which was simply broken, by using DosStartSession() directly. This means we don't need P_DETACH any more (which was not suitable anyway because in QProcess detached doesn't mean the absence of the input and output from the program, it only means the independence from the parent in terms of signals, file handles, termination etc.).
So the P_SESSION implementation in kLIBC for starting PM apps from text mode apps (and vice versa) with inheritance and friends (see the above comments) is the only remaining issue.
comment:5 by , 15 years ago
Summary: | QProcess: Support P_SESSION and P_DETACH → QProcess: Support P_SESSION |
---|
comment:6 by , 6 years ago
Milestone: | Qt Enhanced → Qt 5 |
---|
comment:7 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm closing this in favor of https://github.com/bitwiseworks/libcx/issues/63 and https://github.com/bitwiseworks/qtbase-os2/issues/63.
For the record: the main (the only?) limitation of the current workarounds is that they return an incorrect PID, which is a PID of CMD.EXE instead of a PID of the target application (which is usually greater by 1, but not necessary). This is not expected by Qt applications and may break possible custom IPC communications if they rely on PIDs.