@@ -106,24 +106,25 @@ int start_service(int client_sock)
106106
107107 if (!arg_opt_m && service_pid != -1 )
108108 {
109- if (gdbserver_pid != -1 )
110- {
111- kill (gdbserver_pid , SIGTERM );
112- CHECK (waitpid (gdbserver_pid , NULL , 0 ) == gdbserver_pid );
113- gdbserver_pid = -1 ;
114- }
115- if (strace_pid != -1 )
116- {
117- kill (strace_pid , SIGTERM );
118- CHECK (waitpid (strace_pid , NULL , 0 ) == strace_pid );
119- strace_pid = -1 ;
120- }
121-
122109 kill (service_pid , SIGKILL );
123110 CHECK (waitpid (service_pid , NULL , 0 ) == service_pid );
124111 service_pid = -1 ;
125112 }
126-
113+
114+ if (gdbserver_pid != -1 )
115+ {
116+ kill (gdbserver_pid , SIGTERM );
117+ CHECK (waitpid (gdbserver_pid , NULL , 0 ) == gdbserver_pid );
118+ gdbserver_pid = -1 ;
119+ }
120+
121+ if (strace_pid != -1 )
122+ {
123+ kill (strace_pid , SIGTERM );
124+ CHECK (waitpid (strace_pid , NULL , 0 ) == strace_pid );
125+ strace_pid = -1 ;
126+ }
127+
127128 service_pid = fork ();
128129 if (service_pid == -1 )
129130 {
@@ -179,7 +180,7 @@ int start_service(int client_sock)
179180 {
180181 if (strstr (arg_execve_argv [0 ], "/" ))
181182 {
182- fprintf (stderr , "ERROR: \"%s\" does not exist!\n" , arg_execve_argv [0 ], arg_execve_argv [ 0 ] );
183+ fprintf (stderr , "ERROR: \"%s\" does not exist!\n" , arg_execve_argv [0 ]);
183184 }
184185 else
185186 {
0 commit comments