@@ -71,24 +71,24 @@ def test_arbiter_stop_does_not_unlink_when_using_reuse_port(close_sockets):
7171
7272@mock .patch ('os.getpid' )
7373@mock .patch ('os.fork' )
74- @mock .patch ('os.execvpe ' )
75- def test_arbiter_reexec_passing_systemd_sockets (execvpe , fork , getpid ):
74+ @mock .patch ('os.execve ' )
75+ def test_arbiter_reexec_passing_systemd_sockets (execve , fork , getpid ):
7676 arbiter = gunicorn .arbiter .Arbiter (DummyApplication ())
7777 arbiter .LISTENERS = [mock .Mock (), mock .Mock ()]
7878 arbiter .systemd = True
7979 fork .return_value = 0
8080 getpid .side_effect = [2 , 3 ]
8181 arbiter .reexec ()
82- environ = execvpe .call_args [0 ][2 ]
82+ environ = execve .call_args [0 ][2 ]
8383 assert environ ['GUNICORN_PID' ] == '2'
8484 assert environ ['LISTEN_FDS' ] == '2'
8585 assert environ ['LISTEN_PID' ] == '3'
8686
8787
8888@mock .patch ('os.getpid' )
8989@mock .patch ('os.fork' )
90- @mock .patch ('os.execvpe ' )
91- def test_arbiter_reexec_passing_gunicorn_sockets (execvpe , fork , getpid ):
90+ @mock .patch ('os.execve ' )
91+ def test_arbiter_reexec_passing_gunicorn_sockets (execve , fork , getpid ):
9292 arbiter = gunicorn .arbiter .Arbiter (DummyApplication ())
9393 listener1 = mock .Mock ()
9494 listener2 = mock .Mock ()
@@ -98,7 +98,7 @@ def test_arbiter_reexec_passing_gunicorn_sockets(execvpe, fork, getpid):
9898 fork .return_value = 0
9999 getpid .side_effect = [2 , 3 ]
100100 arbiter .reexec ()
101- environ = execvpe .call_args [0 ][2 ]
101+ environ = execve .call_args [0 ][2 ]
102102 assert environ ['GUNICORN_FD' ] == '4,5'
103103 assert environ ['GUNICORN_PID' ] == '2'
104104
0 commit comments