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
76dd2d14
Kaydet (Commit)
76dd2d14
authored
May 23, 2009
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some pid_t-expecting or producing functions were forgotten in r72852.
üst
5e858fe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
posixmodule.c
Modules/posixmodule.c
+17
-11
No files found.
Modules/posixmodule.c
Dosyayı görüntüle @
76dd2d14
...
...
@@ -3902,7 +3902,7 @@ Return the current process id");
static
PyObject
*
posix_getpid
(
PyObject
*
self
,
PyObject
*
noargs
)
{
return
Py
Int_FromLong
((
long
)
getpid
());
return
Py
Long_FromPid
(
getpid
());
}
...
...
@@ -3956,13 +3956,13 @@ Call the system call getpgid().");
static
PyObject
*
posix_getpgid
(
PyObject
*
self
,
PyObject
*
args
)
{
in
t
pid
,
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
"i
:getpgid"
,
&
pid
))
pid_
t
pid
,
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"
:getpgid"
,
&
pid
))
return
NULL
;
pgid
=
getpgid
(
pid
);
if
(
pgid
<
0
)
return
posix_error
();
return
Py
Int_FromLong
((
long
)
pgid
);
return
Py
Long_FromPid
(
pgid
);
}
#endif
/* HAVE_GETPGID */
...
...
@@ -3976,9 +3976,9 @@ static PyObject *
posix_getpgrp
(
PyObject
*
self
,
PyObject
*
noargs
)
{
#ifdef GETPGRP_HAVE_ARG
return
Py
Int_FromLong
((
long
)
getpgrp
(
0
));
return
Py
Long_FromPid
(
getpgrp
(
0
));
#else
/* GETPGRP_HAVE_ARG */
return
Py
Int_FromLong
((
long
)
getpgrp
());
return
Py
Long_FromPid
(
getpgrp
());
#endif
/* GETPGRP_HAVE_ARG */
}
#endif
/* HAVE_GETPGRP */
...
...
@@ -4012,7 +4012,7 @@ Return the parent's process id.");
static
PyObject
*
posix_getppid
(
PyObject
*
self
,
PyObject
*
noargs
)
{
return
Py
Int_FromLong
(
getppid
());
return
Py
Long_FromPid
(
getppid
());
}
#endif
...
...
@@ -4101,8 +4101,13 @@ Kill a process group with a signal.");
static
PyObject
*
posix_killpg
(
PyObject
*
self
,
PyObject
*
args
)
{
int
pgid
,
sig
;
if
(
!
PyArg_ParseTuple
(
args
,
"ii:killpg"
,
&
pgid
,
&
sig
))
int
sig
;
pid_t
pgid
;
/* XXX some man pages make the `pgid` parameter an int, others
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
int (else compilation of this module fails), which is safe. */
if
(
!
PyArg_ParseTuple
(
args
,
PARSE_PID
"i:killpg"
,
&
pgid
,
&
sig
))
return
NULL
;
if
(
killpg
(
pgid
,
sig
)
==
-
1
)
return
posix_error
();
...
...
@@ -6267,8 +6272,9 @@ Set the process group associated with the terminal given by a fd.");
static
PyObject
*
posix_tcsetpgrp
(
PyObject
*
self
,
PyObject
*
args
)
{
int
fd
,
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
"ii:tcsetpgrp"
,
&
fd
,
&
pgid
))
int
fd
;
pid_t
pgid
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
PARSE_PID
":tcsetpgrp"
,
&
fd
,
&
pgid
))
return
NULL
;
if
(
tcsetpgrp
(
fd
,
pgid
)
<
0
)
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