test
This commit is contained in:
parent
5247787fcf
commit
bed3a2c681
@ -93,6 +93,8 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path, const char
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "gsr info: gsr server path: %s, exists: %s\n", server_filepath, access(server_filepath, F_OK) == 0 ? "yes" : "no");
|
||||||
|
|
||||||
self->card_path = strdup(card_path);
|
self->card_path = strdup(card_path);
|
||||||
if(!self->card_path) {
|
if(!self->card_path) {
|
||||||
fprintf(stderr, "gsr error: gsr_kms_client_init: failed to duplicate card_path\n");
|
fprintf(stderr, "gsr error: gsr_kms_client_init: failed to duplicate card_path\n");
|
||||||
@ -163,11 +165,8 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path, const char
|
|||||||
} else {
|
} else {
|
||||||
int status;
|
int status;
|
||||||
int wait_result = waitpid(self->kms_server_pid, &status, WNOHANG);
|
int wait_result = waitpid(self->kms_server_pid, &status, WNOHANG);
|
||||||
if(wait_result > 0) {
|
if(wait_result != 0) {
|
||||||
fprintf(stderr, "gsr error: gsr_kms_client_init: waitpid failed on kms server, error: %s\n", strerror(errno));
|
fprintf(stderr, "gsr error: gsr_kms_client_init: kms server died or never started, error: %s\n", strerror(errno));
|
||||||
goto err;
|
|
||||||
} else if(wait_result > 0) {
|
|
||||||
fprintf(stderr, "gsr error: gsr_kms_client_init: kms server died\n");
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user