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)

Question 1)

Documentation
.stream~open
SHARED
Enables another process to work with the stream in a shared mode. *(This is
the default.)*

But the default is nonshared, according to implementation :
const char *StreamInfo::streamOpen(const char *options)
{
    int shared = RX_SH_DENYRW;             /* def. open is non
shared           */

Confirmed by this comment :
        // TODO: note that the docs say the default shared mode is SHARED.
But,
        // the code on entry sets the default to not shared.  Need to either
fix
        // 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."


Question 2)
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,
otherwise
    // we'll break the stream BIFs with nested calls.
Should use RX_SH_DENY_NO instead ?


Question 3)
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

Jean-Louis
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to