[EXTERNAL] Re: 3.4.6-1 shm_open always returns -1, errno EINVAL
Lavrentiev, Anton (NIH/NLM/NCBI) [C]
lavr@ncbi.nlm.nih.gov
Mon Mar 13 15:07:28 GMT 2023
> > returns 3 and sets errno to zero.
Note that "setting errno to zero" is not guaranteed in case of a successful completion of a library function or a system call.
Generally, "errno" reflects an error that occurred last when such a call failed (so in other words, in case of a successful
completion, "errno" can still carry over an error from a previously failed call). In this particular use case, it looks like
"errno" was clear from the get go because nothing was called prior to "shm_open()", and so it remained so when the call returned (successfully).
HTH,
Anton Lavrentiev
Contractor NIH/NLM/NCBI
More information about the Cygwin
mailing list