fix for confused fork
This commit is contained in:
parent
498b475df6
commit
bfabd9ead4
4
main.c
4
main.c
@ -655,11 +655,11 @@ void server(int port) {
|
|||||||
// fork ssh server
|
// fork ssh server
|
||||||
ssh_pid = fork();
|
ssh_pid = fork();
|
||||||
|
|
||||||
if (ssh_pid > 0) {
|
if (ssh_pid == 0) {
|
||||||
serverssh(conf.ssh_port);
|
serverssh(conf.ssh_port);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if (ssh_pid != 0) {
|
if (ssh_pid < 0) {
|
||||||
fprintf(stderr, "Error forking ssh server.");
|
fprintf(stderr, "Error forking ssh server.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user