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
a2326136
Kaydet (Commit)
a2326136
authored
Agu 27, 2014
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
The webbrowser module now uses subprocess's start_new_session=True rather
than a potentially risky preexec_fn=os.setsid call.
üst
7cea44d3
feac3980
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 @
a2326136
...
...
@@ -159,10 +159,8 @@ class BackgroundBrowser(GenericBrowser):
if
sys
.
platform
[:
3
]
==
'win'
:
p
=
subprocess
.
Popen
(
cmdline
)
else
:
setsid
=
getattr
(
os
,
'setsid'
,
None
)
if
not
setsid
:
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
preexec_fn
=
setsid
)
p
=
subprocess
.
Popen
(
cmdline
,
close_fds
=
True
,
start_new_session
=
True
)
return
(
p
.
poll
()
is
None
)
except
OSError
:
return
False
...
...
@@ -321,11 +319,6 @@ class Konqueror(BaseBrowser):
action
=
"openURL"
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
:
p
=
subprocess
.
Popen
([
"kfmclient"
,
action
,
url
],
...
...
@@ -343,7 +336,7 @@ class Konqueror(BaseBrowser):
p
=
subprocess
.
Popen
([
"konqueror"
,
"--silent"
,
url
],
close_fds
=
True
,
stdin
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
preexec_fn
=
setsid
)
start_new_session
=
True
)
except
OSError
:
# fall through to next variant
pass
...
...
@@ -356,7 +349,7 @@ class Konqueror(BaseBrowser):
p
=
subprocess
.
Popen
([
"kfm"
,
"-d"
,
url
],
close_fds
=
True
,
stdin
=
devnull
,
stdout
=
devnull
,
stderr
=
devnull
,
preexec_fn
=
setsid
)
start_new_session
=
True
)
except
OSError
:
return
False
else
:
...
...
Misc/NEWS
Dosyayı görüntüle @
a2326136
...
...
@@ -124,6 +124,9 @@ Core and Builtins
Library
-------
-
The
webbrowser
module
now
uses
subprocess
's start_new_session=True rather
than a potentially risky preexec_fn=os.setsid call.
- Issue #22042: signal.set_wakeup_fd(fd) now raises an exception if the file
descriptor is in blocking mode.
...
...
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