Some questions about stream sharing options (just trying to understand why,
under Windows, my log file is not updated by the callee when both the caller
and the callee open a stream on the same log file)
Enables another process to work with the stream in a shared mode. *(This is
But the default is nonshared, according to implementation :
const char *StreamInfo::streamOpen(const char *options)
int shared = RX_SH_DENYRW; /* def. open is non
Confirmed by this comment :
// TODO: note that the docs say the default shared mode is SHARED.
// the code on entry sets the default to not shared. Need to either
// the docs or the code.
Just curious to know why no decision taken yet :-)
Is it because of the standard ? I see that in X3J18 :
"This standard does not define how programs in the system interact by making
joint use of components of the system. In practice, it is to be expected
that the file system which supports streams will be shared, the External
Data Queue will be shared, and the External Variable Pools will be shared."
In StreamNative.cpp, it seems that the use of RX_SH_DENYWR is not respecting
the following comment (when the comment applies) :
// If this is an implicit open, try to open for shared readwrite,
// we'll break the stream BIFs with nested calls.
Should use RX_SH_DENY_NO instead ?
The sharing options have no effect under Unix ?
I see in unix/SysFile.hpp that all flags are 0.
And the parameter shareMode is not used by SysFile::open