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
8e3ca8af
Kaydet (Commit)
8e3ca8af
authored
Ock 23, 2005
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Flush std{in,out,err} before closing it. Fixes #1074011.
Will backport to 2.4 and 2.3.
üst
c3001755
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
NEWS
Misc/NEWS
+3
-0
sysmodule.c
Python/sysmodule.c
+10
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
8e3ca8af
...
@@ -10,6 +10,9 @@ What's New in Python 2.5 alpha 1?
...
@@ -10,6 +10,9 @@ What's New in Python 2.5 alpha 1?
Core and builtins
Core and builtins
-----------------
-----------------
- Bug #1074011: closing sys.std{in,out,err} now causes a flush() and
an ferror() call.
- min() and max() now support key= arguments with the same meaning as in
- min() and max() now support key= arguments with the same meaning as in
list.sort().
list.sort().
...
...
Python/sysmodule.c
Dosyayı görüntüle @
8e3ca8af
...
@@ -927,6 +927,13 @@ settrace() -- set the global debug tracing function\n\
...
@@ -927,6 +927,13 @@ settrace() -- set the global debug tracing function\n\
)
)
/* end of sys_doc */
;
/* end of sys_doc */
;
static
int
_check_and_flush
(
FILE
*
stream
)
{
int
prev_fail
=
ferror
(
stream
);
return
fflush
(
stream
)
||
prev_fail
?
EOF
:
0
;
}
PyObject
*
PyObject
*
_PySys_Init
(
void
)
_PySys_Init
(
void
)
{
{
...
@@ -940,9 +947,9 @@ _PySys_Init(void)
...
@@ -940,9 +947,9 @@ _PySys_Init(void)
m
=
Py_InitModule3
(
"sys"
,
sys_methods
,
sys_doc
);
m
=
Py_InitModule3
(
"sys"
,
sys_methods
,
sys_doc
);
sysdict
=
PyModule_GetDict
(
m
);
sysdict
=
PyModule_GetDict
(
m
);
sysin
=
PyFile_FromFile
(
stdin
,
"<stdin>"
,
"r"
,
NULL
);
sysin
=
PyFile_FromFile
(
stdin
,
"<stdin>"
,
"r"
,
_check_and_flush
);
sysout
=
PyFile_FromFile
(
stdout
,
"<stdout>"
,
"w"
,
NULL
);
sysout
=
PyFile_FromFile
(
stdout
,
"<stdout>"
,
"w"
,
_check_and_flush
);
syserr
=
PyFile_FromFile
(
stderr
,
"<stderr>"
,
"w"
,
NULL
);
syserr
=
PyFile_FromFile
(
stderr
,
"<stderr>"
,
"w"
,
_check_and_flush
);
if
(
PyErr_Occurred
())
if
(
PyErr_Occurred
())
return
NULL
;
return
NULL
;
#ifdef MS_WINDOWS
#ifdef MS_WINDOWS
...
...
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