Mercurial > dropbear
comparison cli-main.c @ 1795:f0a524208d97
Update cli-main.c (#114)
Moved pid_t proxy_cmd_pid declaration at begin of block to allow build in c89 (gcc-2.95)
author | Guillaume Picquet <guillaume.picquet@gls-france.com> |
---|---|
date | Thu, 04 Mar 2021 13:46:46 +0100 |
parents | d1b279aa5ed1 |
children | 1d86a58fb52d |
comparison
equal
deleted
inserted
replaced
1794:ed20d805b332 | 1795:f0a524208d97 |
---|---|
45 int main(int argc, char ** argv) { | 45 int main(int argc, char ** argv) { |
46 #endif | 46 #endif |
47 | 47 |
48 int sock_in, sock_out; | 48 int sock_in, sock_out; |
49 struct dropbear_progress_connection *progress = NULL; | 49 struct dropbear_progress_connection *progress = NULL; |
50 pid_t proxy_cmd_pid = 0; | |
50 | 51 |
51 _dropbear_exit = cli_dropbear_exit; | 52 _dropbear_exit = cli_dropbear_exit; |
52 _dropbear_log = cli_dropbear_log; | 53 _dropbear_log = cli_dropbear_log; |
53 | 54 |
54 disallow_core(); | 55 disallow_core(); |
69 | 70 |
70 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { | 71 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { |
71 dropbear_exit("signal() error"); | 72 dropbear_exit("signal() error"); |
72 } | 73 } |
73 | 74 |
74 pid_t proxy_cmd_pid = 0; | |
75 #if DROPBEAR_CLI_PROXYCMD | 75 #if DROPBEAR_CLI_PROXYCMD |
76 if (cli_opts.proxycmd) { | 76 if (cli_opts.proxycmd) { |
77 cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid); | 77 cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid); |
78 m_free(cli_opts.proxycmd); | 78 m_free(cli_opts.proxycmd); |
79 if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR || | 79 if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR || |