GUACAMOLE-662: Correct fork logic (main test process should be PARENT, not child).

This commit is contained in:
Michael Jumper 2018-11-13 21:35:16 -08:00
parent 0d435e2435
commit 2827af33d6
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ void test_instruction_read() {
} }
/* Child (pipe writer) */ /* Child (pipe writer) */
if (childpid != 0) { if (childpid == 0) {
close(rfd); close(rfd);
CU_ASSERT_EQUAL( CU_ASSERT_EQUAL(
write(wfd, test_string, sizeof(test_string)), write(wfd, test_string, sizeof(test_string)),

View File

@ -50,7 +50,7 @@ void test_instruction_write() {
} }
/* Child (pipe writer) */ /* Child (pipe writer) */
if (childpid != 0) { if (childpid == 0) {
guac_socket* socket; guac_socket* socket;

View File

@ -50,7 +50,7 @@ void test_nest_write() {
} }
/* Child (pipe writer) */ /* Child (pipe writer) */
if (childpid != 0) { if (childpid == 0) {
guac_socket* nested_socket; guac_socket* nested_socket;
guac_socket* socket; guac_socket* socket;