Replies: 2 comments
-
If you need a custom input, you may use |
Beta Was this translation helpful? Give feedback.
-
Thanks, It helped: closing file process on rnpgp is correct. Solved by RAII
|
Beta Was this translation helpful? Give feedback.
-
I am using rnp_input_from_path
to open an encrypted file on Windows, but I noticed that the file descriptor is not freed after the function call. [There is no fclose or _wclose in the source code of
rnp_input_destroy(input)
.How can I fix this issue?
This causes the file to remain locked by the OS, and I cannot write to it later.
(This is not a problem on Mac or Linux, as verified with
lsof -c pass-simple | wc -l
.I guess on macos. it probably performs opportunistic open with no lock.
)
Can I manage the open and close of the fd from outside the library?
(I sow the
res = rnp_input_from_stdin(&input);
but it does not accept standardistream
,ostream
, or standard C styleFILE *
.(it is used to handel console
std::cin
only within enclosed within the function itself)Beta Was this translation helpful? Give feedback.
All reactions