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
84508570
Kaydet (Commit)
84508570
authored
Mar 14, 2010
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Change PARSE_PID to _Py_PARSE_PID (cleanup for r78946).
üst
ab0a7527
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
longobject.h
Include/longobject.h
+3
-3
posixmodule.c
Modules/posixmodule.c
+9
-9
No files found.
Include/longobject.h
Dosyayı görüntüle @
84508570
...
@@ -43,15 +43,15 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
...
@@ -43,15 +43,15 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
/* Issue #1983: pid_t can be longer than a C long on some systems */
/* Issue #1983: pid_t can be longer than a C long on some systems */
#if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
#if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
#define PARSE_PID "i"
#define
_Py_
PARSE_PID "i"
#define PyLong_FromPid PyLong_FromLong
#define PyLong_FromPid PyLong_FromLong
#define PyLong_AsPid PyLong_AsLong
#define PyLong_AsPid PyLong_AsLong
#elif SIZEOF_PID_T == SIZEOF_LONG
#elif SIZEOF_PID_T == SIZEOF_LONG
#define PARSE_PID "l"
#define
_Py_
PARSE_PID "l"
#define PyLong_FromPid PyLong_FromLong
#define PyLong_FromPid PyLong_FromLong
#define PyLong_AsPid PyLong_AsLong
#define PyLong_AsPid PyLong_AsLong
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_PID_T == SIZEOF_LONG_LONG
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_PID_T == SIZEOF_LONG_LONG
#define PARSE_PID "L"
#define
_Py_
PARSE_PID "L"
#define PyLong_FromPid PyLong_FromLongLong
#define PyLong_FromPid PyLong_FromLongLong
#define PyLong_AsPid PyLong_AsLongLong
#define PyLong_AsPid PyLong_AsLongLong
#else
#else
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
84508570
...
@@ -4012,7 +4012,7 @@ static PyObject *
...
@@ -4012,7 +4012,7 @@ static PyObject *
posix_getpgid
(
PyObject
*
self
,
PyObject
*
args
)
posix_getpgid
(
PyObject
*
self
,
PyObject
*
args
)
{
{
pid_t
pid
,
pgid
;
pid_t
pid
,
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
":getpgid"
,
&
pid
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
":getpgid"
,
&
pid
))
return
NULL
;
return
NULL
;
pgid
=
getpgid
(
pid
);
pgid
=
getpgid
(
pid
);
if
(
pgid
<
0
)
if
(
pgid
<
0
)
...
@@ -4124,7 +4124,7 @@ posix_kill(PyObject *self, PyObject *args)
...
@@ -4124,7 +4124,7 @@ posix_kill(PyObject *self, PyObject *args)
{
{
pid_t
pid
;
pid_t
pid
;
int
sig
;
int
sig
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:kill"
,
&
pid
,
&
sig
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:kill"
,
&
pid
,
&
sig
))
return
NULL
;
return
NULL
;
#if defined(PYOS_OS2) && !defined(PYCC_GCC)
#if defined(PYOS_OS2) && !defined(PYCC_GCC)
if
(
sig
==
XCPT_SIGNAL_INTR
||
sig
==
XCPT_SIGNAL_BREAK
)
{
if
(
sig
==
XCPT_SIGNAL_INTR
||
sig
==
XCPT_SIGNAL_BREAK
)
{
...
@@ -4162,7 +4162,7 @@ posix_killpg(PyObject *self, PyObject *args)
...
@@ -4162,7 +4162,7 @@ posix_killpg(PyObject *self, PyObject *args)
a pid_t. Since getpgrp() returns a pid_t, we assume killpg should
a pid_t. Since getpgrp() returns a pid_t, we assume killpg should
take the same type. Moreover, pid_t is always at least as wide as
take the same type. Moreover, pid_t is always at least as wide as
int (else compilation of this module fails), which is safe. */
int (else compilation of this module fails), which is safe. */
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:killpg"
,
&
pgid
,
&
sig
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:killpg"
,
&
pgid
,
&
sig
))
return
NULL
;
return
NULL
;
if
(
killpg
(
pgid
,
sig
)
==
-
1
)
if
(
killpg
(
pgid
,
sig
)
==
-
1
)
return
posix_error
();
return
posix_error
();
...
@@ -4519,7 +4519,7 @@ posix_wait4(PyObject *self, PyObject *args)
...
@@ -4519,7 +4519,7 @@ posix_wait4(PyObject *self, PyObject *args)
WAIT_TYPE
status
;
WAIT_TYPE
status
;
WAIT_STATUS_INT
(
status
)
=
0
;
WAIT_STATUS_INT
(
status
)
=
0
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:wait4"
,
&
pid
,
&
options
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:wait4"
,
&
pid
,
&
options
))
return
NULL
;
return
NULL
;
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
...
@@ -4543,7 +4543,7 @@ posix_waitpid(PyObject *self, PyObject *args)
...
@@ -4543,7 +4543,7 @@ posix_waitpid(PyObject *self, PyObject *args)
WAIT_TYPE
status
;
WAIT_TYPE
status
;
WAIT_STATUS_INT
(
status
)
=
0
;
WAIT_STATUS_INT
(
status
)
=
0
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:waitpid"
,
&
pid
,
&
options
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:waitpid"
,
&
pid
,
&
options
))
return
NULL
;
return
NULL
;
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
pid
=
waitpid
(
pid
,
&
status
,
options
);
pid
=
waitpid
(
pid
,
&
status
,
options
);
...
@@ -4567,7 +4567,7 @@ posix_waitpid(PyObject *self, PyObject *args)
...
@@ -4567,7 +4567,7 @@ posix_waitpid(PyObject *self, PyObject *args)
Py_intptr_t
pid
;
Py_intptr_t
pid
;
int
status
,
options
;
int
status
,
options
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:waitpid"
,
&
pid
,
&
options
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:waitpid"
,
&
pid
,
&
options
))
return
NULL
;
return
NULL
;
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
pid
=
_cwait
(
&
status
,
pid
,
options
);
pid
=
_cwait
(
&
status
,
pid
,
options
);
...
@@ -4783,7 +4783,7 @@ posix_getsid(PyObject *self, PyObject *args)
...
@@ -4783,7 +4783,7 @@ posix_getsid(PyObject *self, PyObject *args)
{
{
pid_t
pid
;
pid_t
pid
;
int
sid
;
int
sid
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
":getsid"
,
&
pid
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
":getsid"
,
&
pid
))
return
NULL
;
return
NULL
;
sid
=
getsid
(
pid
);
sid
=
getsid
(
pid
);
if
(
sid
<
0
)
if
(
sid
<
0
)
...
@@ -4818,7 +4818,7 @@ posix_setpgid(PyObject *self, PyObject *args)
...
@@ -4818,7 +4818,7 @@ posix_setpgid(PyObject *self, PyObject *args)
{
{
pid_t
pid
;
pid_t
pid
;
int
pgrp
;
int
pgrp
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:setpgid"
,
&
pid
,
&
pgrp
))
if
(
!
PyArg_ParseTuple
(
args
,
_Py_
PARSE_PID
"i:setpgid"
,
&
pid
,
&
pgrp
))
return
NULL
;
return
NULL
;
if
(
setpgid
(
pid
,
pgrp
)
<
0
)
if
(
setpgid
(
pid
,
pgrp
)
<
0
)
return
posix_error
();
return
posix_error
();
...
@@ -4858,7 +4858,7 @@ posix_tcsetpgrp(PyObject *self, PyObject *args)
...
@@ -4858,7 +4858,7 @@ posix_tcsetpgrp(PyObject *self, PyObject *args)
{
{
int
fd
;
int
fd
;
pid_t
pgid
;
pid_t
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
PARSE_PID
":tcsetpgrp"
,
&
fd
,
&
pgid
))
if
(
!
PyArg_ParseTuple
(
args
,
"i"
_Py_
PARSE_PID
":tcsetpgrp"
,
&
fd
,
&
pgid
))
return
NULL
;
return
NULL
;
if
(
tcsetpgrp
(
fd
,
pgid
)
<
0
)
if
(
tcsetpgrp
(
fd
,
pgid
)
<
0
)
return
posix_error
();
return
posix_error
();
...
...
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