Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
431774f3
Kaydet (Commit)
431774f3
authored
Agu 08, 2010
tarafından
Tim Golden
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #3210: Revert C module changes and apply patch from Hirokazu Yamamoto instead
üst
3de8a305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
31 deletions
+15
-31
subprocess.py
Lib/subprocess.py
+13
-14
_subprocess.c
PC/_subprocess.c
+2
-17
No files found.
Lib/subprocess.py
Dosyayı görüntüle @
431774f3
...
@@ -886,6 +886,19 @@ class Popen(object):
...
@@ -886,6 +886,19 @@ class Popen(object):
# translate errno using _sys_errlist (or simliar), but
# translate errno using _sys_errlist (or simliar), but
# how can this be done from Python?
# how can this be done from Python?
raise
WindowsError
(
*
e
.
args
)
raise
WindowsError
(
*
e
.
args
)
finally
:
# Child is launched. Close the parent's copy of those pipe
# handles that only the child should have open. You need
# to make sure that no handles to the write end of the
# output pipe are maintained in this process or else the
# pipe will not close when the child process exits and the
# ReadFile will hang.
if
p2cread
is
not
None
:
p2cread
.
Close
()
if
c2pwrite
is
not
None
:
c2pwrite
.
Close
()
if
errwrite
is
not
None
:
errwrite
.
Close
()
# Retain the process handle, but close the thread handle
# Retain the process handle, but close the thread handle
self
.
_child_created
=
True
self
.
_child_created
=
True
...
@@ -893,20 +906,6 @@ class Popen(object):
...
@@ -893,20 +906,6 @@ class Popen(object):
self
.
pid
=
pid
self
.
pid
=
pid
ht
.
Close
()
ht
.
Close
()
# Child is launched. Close the parent's copy of those pipe
# handles that only the child should have open. You need
# to make sure that no handles to the write end of the
# output pipe are maintained in this process or else the
# pipe will not close when the child process exits and the
# ReadFile will hang.
if
p2cread
is
not
None
:
p2cread
.
Close
()
if
c2pwrite
is
not
None
:
c2pwrite
.
Close
()
if
errwrite
is
not
None
:
errwrite
.
Close
()
def
_internal_poll
(
self
,
_deadstate
=
None
,
def
_internal_poll
(
self
,
_deadstate
=
None
,
_WaitForSingleObject
=
_subprocess
.
WaitForSingleObject
,
_WaitForSingleObject
=
_subprocess
.
WaitForSingleObject
,
_WAIT_OBJECT_0
=
_subprocess
.
WAIT_OBJECT_0
,
_WAIT_OBJECT_0
=
_subprocess
.
WAIT_OBJECT_0
,
...
...
PC/_subprocess.c
Dosyayı görüntüle @
431774f3
...
@@ -425,7 +425,6 @@ sp_CreateProcess(PyObject* self, PyObject* args)
...
@@ -425,7 +425,6 @@ sp_CreateProcess(PyObject* self, PyObject* args)
PyObject
*
env_mapping
;
PyObject
*
env_mapping
;
char
*
current_directory
;
char
*
current_directory
;
PyObject
*
startup_info
;
PyObject
*
startup_info
;
DWORD
error
;
if
(
!
PyArg_ParseTuple
(
args
,
"zzOOiiOzO:CreateProcess"
,
if
(
!
PyArg_ParseTuple
(
args
,
"zzOOiiOzO:CreateProcess"
,
&
application_name
,
&
application_name
,
...
@@ -475,22 +474,8 @@ sp_CreateProcess(PyObject* self, PyObject* args)
...
@@ -475,22 +474,8 @@ sp_CreateProcess(PyObject* self, PyObject* args)
Py_XDECREF
(
environment
);
Py_XDECREF
(
environment
);
if
(
!
result
)
{
if
(
!
result
)
error
=
GetLastError
();
return
PyErr_SetFromWindowsErr
(
GetLastError
());
if
(
si
.
hStdInput
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
si
.
hStdInput
);
si
.
hStdInput
=
INVALID_HANDLE_VALUE
;
}
if
(
si
.
hStdOutput
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
si
.
hStdOutput
);
si
.
hStdOutput
=
INVALID_HANDLE_VALUE
;
}
if
(
si
.
hStdError
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
si
.
hStdError
);
si
.
hStdError
=
INVALID_HANDLE_VALUE
;
}
return
PyErr_SetFromWindowsErr
(
error
);
}
return
Py_BuildValue
(
"NNii"
,
return
Py_BuildValue
(
"NNii"
,
sp_handle_new
(
pi
.
hProcess
),
sp_handle_new
(
pi
.
hProcess
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment