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
ffb32893
Kaydet (Commit)
ffb32893
authored
Agu 02, 2013
tarafından
Ned Deily
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #17557: merge from 3.3
üst
4dbc95e2
b5dd6d22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
posixmodule.c
Modules/posixmodule.c
+30
-0
No files found.
Misc/ACKS
Dosyayı görüntüle @
ffb32893
...
...
@@ -737,6 +737,7 @@ Petri Lehtinen
Luke Kenneth Casson Leighton
Tshepang Lekhonkhobe
Marc-André Lemburg
Mateusz Lenik
John Lenton
Kostyantyn Leschenko
Benno Leslie
...
...
Misc/NEWS
Dosyayı görüntüle @
ffb32893
...
...
@@ -184,6 +184,9 @@ Core and Builtins
Library
-------
-
Issue
#
17557
:
Fix
os
.
getgroups
()
to
work
with
the
modified
behavior
of
getgroups
(
2
)
on
OS
X
10.8
.
Original
patch
by
Mateusz
Lenik
.
-
Issue
#
18608
:
Avoid
keeping
a
strong
reference
to
the
locale
module
inside
the
_io
module
.
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
ffb32893
...
...
@@ -5911,6 +5911,34 @@ posix_getgroups(PyObject *self, PyObject *noargs)
gid_t
*
alt_grouplist
=
grouplist
;
int
n
;
#ifdef __APPLE__
/* Issue #17557: As of OS X 10.8, getgroups(2) no longer raises EINVAL if
* there are more groups than can fit in grouplist. Therefore, on OS X
* always first call getgroups with length 0 to get the actual number
* of groups.
*/
n
=
getgroups
(
0
,
NULL
);
if
(
n
<
0
)
{
return
posix_error
();
}
else
if
(
n
<=
MAX_GROUPS
)
{
/* groups will fit in existing array */
alt_grouplist
=
grouplist
;
}
else
{
alt_grouplist
=
PyMem_Malloc
(
n
*
sizeof
(
gid_t
));
if
(
alt_grouplist
==
NULL
)
{
errno
=
EINVAL
;
return
posix_error
();
}
}
n
=
getgroups
(
n
,
alt_grouplist
);
if
(
n
==
-
1
)
{
if
(
alt_grouplist
!=
grouplist
)
{
PyMem_Free
(
alt_grouplist
);
}
return
posix_error
();
}
#else
n
=
getgroups
(
MAX_GROUPS
,
grouplist
);
if
(
n
<
0
)
{
if
(
errno
==
EINVAL
)
{
...
...
@@ -5937,6 +5965,8 @@ posix_getgroups(PyObject *self, PyObject *noargs)
return
posix_error
();
}
}
#endif
result
=
PyList_New
(
n
);
if
(
result
!=
NULL
)
{
int
i
;
...
...
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