get standard FILE stream- out and err for openssl bio_out and bio_err (#22)
Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/22 Co-authored-by: siddhant <siddhant.singh@neominds.in> Co-committed-by: siddhant <siddhant.singh@neominds.in>
This commit is contained in:
@@ -840,8 +840,22 @@ int ipcrypto_init_internal(SEM_ID semId)
|
||||
|
||||
#if defined (_WRS_KERNEL)
|
||||
/* use shareable FILEs rather than task-specific stdout/stderr */
|
||||
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
int fdout, fderr;
|
||||
FILE *fpout = NULL, *fperr = NULL;
|
||||
|
||||
fdout = ioGlobalStdGet(STD_OUT);
|
||||
fderr = ioGlobalStdGet(STD_ERR);
|
||||
|
||||
fpout = fdopen(fdout, "w");
|
||||
fperr = fdopen(fderr, "w");
|
||||
if (!fpout || !fderr)
|
||||
{
|
||||
printf ("Failed to open file for stdout and stderr\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
bio_out = BIO_new_fp(fpout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(fperr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
#else
|
||||
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||
|
||||
Reference in New Issue
Block a user