@@ -129,9 +129,6 @@ ServerOptions options;
129
129
* the first connection.
130
130
*/
131
131
int debug_flag = 0 ;
132
- #ifdef WINDOWS
133
- debug_startup_p = -1 ;
134
- #endif /* WINDOWS */
135
132
136
133
/* Saved arguments to main(). */
137
134
static char * * saved_argv ;
@@ -1247,17 +1244,10 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s,
1247
1244
close_listen_socks ();
1248
1245
* sock_in = * newsock ;
1249
1246
* sock_out = * newsock ;
1250
- close (startup_p [0 ]);
1251
1247
#ifndef WINDOWS
1252
- close (startup_p [1 ]);
1253
- #endif /* WINDOWS */
1254
- startup_pipe = -1 ;
1255
- #ifdef WINDOWS
1256
- debug_startup_p = startup_p [1 ];
1257
- #else
1258
1248
send_rexec_state (config_s [0 ]);
1259
1249
close (config_s [0 ]);
1260
- #endif /* WINDOWS */
1250
+ #endif /* ! WINDOWS */
1261
1251
free (pfd );
1262
1252
return ;
1263
1253
}
@@ -1269,14 +1259,13 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s,
1269
1259
if (posix_spawn_file_actions_init (& actions ) != 0 ||
1270
1260
posix_spawn_file_actions_adddup2 (& actions , * newsock , STDIN_FILENO ) != 0 ||
1271
1261
posix_spawn_file_actions_adddup2 (& actions , * newsock , STDOUT_FILENO ) != 0 ||
1272
- posix_spawn_file_actions_adddup2 (& actions , startup_p [1 ], REEXEC_STARTUP_PIPE_FD ) != 0 ||
1273
1262
posix_spawn_file_actions_adddup2 (& actions , config_s [1 ], REEXEC_CONFIG_PASS_FD ) != 0 ||
1274
1263
posix_spawnattr_init (& attributes ) != 0 ||
1275
1264
posix_spawnattr_setflags (& attributes , POSIX_SPAWN_SETPGROUP ) != 0 ||
1276
1265
posix_spawnattr_setpgroup (& attributes , 0 ) != 0 )
1277
1266
error ("posix_spawn initialization failed" );
1278
1267
else {
1279
- child = child_register (startup_p [0 ], * newsock );
1268
+ child = child_register (config_s [0 ], * newsock );
1280
1269
if (posix_spawn (& child -> pid , rexec_argv [0 ], & actions , & attributes , rexec_argv , NULL ) != 0 )
1281
1270
error ("%s, posix_spawn failed" , __func__ );
1282
1271
posix_spawn_file_actions_destroy (& actions );
@@ -2037,7 +2026,6 @@ main(int ac, char **av)
2037
2026
if (posix_spawn_file_actions_init (& actions ) != 0 ||
2038
2027
(debug_flag && posix_spawn_file_actions_adddup2 (& actions , newsock , STDIN_FILENO ) != 0 ) ||
2039
2028
(debug_flag && posix_spawn_file_actions_adddup2 (& actions , newsock , STDOUT_FILENO ) != 0 ) ||
2040
- (debug_flag && posix_spawn_file_actions_adddup2 (& actions , debug_startup_p , REEXEC_STARTUP_PIPE_FD ) != 0 ) ||
2041
2029
posix_spawn_file_actions_adddup2 (& actions , config_s [1 ], REEXEC_CONFIG_PASS_FD ) != 0 ||
2042
2030
posix_spawnattr_init (& attributes ) != 0 ||
2043
2031
posix_spawnattr_setflags (& attributes , POSIX_SPAWN_SETPGROUP ) != 0 ||
@@ -2050,9 +2038,8 @@ main(int ac, char **av)
2050
2038
posix_spawn_file_actions_destroy (& actions );
2051
2039
posix_spawnattr_destroy (& attributes );
2052
2040
}
2053
- close (debug_startup_p );
2054
2041
close (config_s [1 ]);
2055
- send_rexec_state (config_s [0 ], cfg );
2042
+ send_rexec_state (config_s [0 ]);
2056
2043
close (config_s [0 ]);
2057
2044
close (newsock );
2058
2045
cleanup_exit (255 );
0 commit comments