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
c0348ac6
Kaydet (Commit)
c0348ac6
authored
Tem 08, 2000
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- removed barry's workaround, to make room for
bill's more complete solution.
üst
89610a4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
WinMain.c
PC/WinMain.c
+0
-30
No files found.
PC/WinMain.c
Dosyayı görüntüle @
c0348ac6
...
...
@@ -2,8 +2,6 @@
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "Python.h"
...
...
@@ -16,33 +14,5 @@ int WINAPI WinMain(
int
nCmdShow
/* show state of window */
)
{
int
null_file
;
/*
* make sure that the C RTL has valid file descriptors for
* stdin, stdout, stderr. Use the NUL device if necessary.
* This allows popen to work under pythonw.
*
* When pythonw.exe starts the C RTL function _ioinit is called
* first. WinMain is called later hence the need to check for
* invalid handles.
*
* Note: FILE stdin, stdout, stderr do not use the file descriptors
* setup here. They are already initialised before WinMain was called.
*/
null_file
=
open
(
"NUL"
,
_O_RDWR
);
if
(
_get_osfhandle
(
0
)
==
-
1
)
dup2
(
null_file
,
0
);
if
(
_get_osfhandle
(
1
)
==
-
1
)
dup2
(
null_file
,
1
);
if
(
_get_osfhandle
(
2
)
==
-
1
)
dup2
(
null_file
,
2
);
close
(
null_file
);
return
Py_Main
(
__argc
,
__argv
);
}
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