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
feac3980
Kaydet (Commit)
feac3980
authored
Agu 27, 2014
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The webbrowser module now uses subprocess's start_new_session=True rather
than a potentially risky preexec_fn=os.setsid call.
üst
2ced87f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
webbrowser.py
Lib/webbrowser.py
+4
-11
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/webbrowser.py
Dosyayı görüntüle @
feac3980
...
@@ -159,10 +159,8 @@ class BackgroundBrowser(GenericBrowser):
...
@@ -159,10 +159,8 @@ class BackgroundBrowser(GenericBrowser):
if
sys
.
platform
[:
3
]
==
'win'
:
if
sys
.
platform
[:
3
]
==
'win'
:
p
=
subprocess
.
Popen
(
cmdline
)
p
=
subprocess
.
Popen
(
cmdline
)
else
:
else
:
setsid
=
getattr
(
os
,
'setsid'
,
None
)
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
if
not
setsid
:
start_new_session
=
True
)
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
preexec_fn
=
setsid
)
return
(
p
.
poll
()
is
None
)
return
(
p
.
poll
()
is
None
)
except
OSError
:
except
OSError
:
return
False
return
False
...
@@ -321,11 +319,6 @@ class Konqueror(BaseBrowser):
...
@@ -321,11 +319,6 @@ class Konqueror(BaseBrowser):
action
=
"openURL"
action
=
"openURL"
devnull
=
subprocess
.
DEVNULL
devnull
=
subprocess
.
DEVNULL
# if possible, put browser in separate process group, so
# keyboard interrupts don't affect browser as well as Python
setsid
=
getattr
(
os
,
'setsid'
,
None
)
if
not
setsid
:
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
try
:
try
:
p
=
subprocess
.
Popen
([
"kfmclient"
,
action
,
url
],
p
=
subprocess
.
Popen
([
"kfmclient"
,
action
,
url
],
...
@@ -343,7 +336,7 @@ class Konqueror(BaseBrowser):
...
@@ -343,7 +336,7 @@ class Konqueror(BaseBrowser):
p
=
subprocess
.
Popen
([
"konqueror"
,
"--silent"
,
url
],
p
=
subprocess
.
Popen
([
"konqueror"
,
"--silent"
,
url
],
close_fds
=
True
,
stdin
=
devnull
,
close_fds
=
True
,
stdin
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
preexec_fn
=
setsid
)
start_new_session
=
True
)
except
OSError
:
except
OSError
:
# fall through to next variant
# fall through to next variant
pass
pass
...
@@ -356,7 +349,7 @@ class Konqueror(BaseBrowser):
...
@@ -356,7 +349,7 @@ class Konqueror(BaseBrowser):
p
=
subprocess
.
Popen
([
"kfm"
,
"-d"
,
url
],
p
=
subprocess
.
Popen
([
"kfm"
,
"-d"
,
url
],
close_fds
=
True
,
stdin
=
devnull
,
close_fds
=
True
,
stdin
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
preexec_fn
=
setsid
)
start_new_session
=
True
)
except
OSError
:
except
OSError
:
return
False
return
False
else
:
else
:
...
...
Misc/NEWS
Dosyayı görüntüle @
feac3980
...
@@ -27,6 +27,9 @@ Core and Builtins
...
@@ -27,6 +27,9 @@ Core and Builtins
Library
Library
-------
-------
- The webbrowser module now uses subprocess'
s
start_new_session
=
True
rather
than
a
potentially
risky
preexec_fn
=
os
.
setsid
call
.
-
Issue
#
22236
:
Fixed
Tkinter
images
copying
operations
in
NoDefaultRoot
mode
.
-
Issue
#
22236
:
Fixed
Tkinter
images
copying
operations
in
NoDefaultRoot
mode
.
-
Issue
#
22191
:
Fix
warnings
.
__all__
.
-
Issue
#
22191
:
Fix
warnings
.
__all__
.
...
...
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