Right! The open() API has no way to set it to a wait period of time. The
main rule to open a stream file on the IFS while another job opened it
already, is that the first job getting privileges did not set exclusive,
non-shared open flags. Otherwise it should open the file successfully.

JS



El mié, 12 nov 2025 a las 13:04, Daniel Gross (<daniel@xxxxxxxx>) escribió:

Hi,

AFAIK the open() API does return immediately with an error, if the file
could not be opened - like if it is already open in an non-shareable
open-mode.

Regards,
Daniel


Am 12.11.2025 um 19:36 schrieb gio.cot via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx>:

Hi All



If i run this code, and the "stmf" is opened from another job, is there
any
wait time after that, i receive error, or the code wait for ever or
until
the "stmf" is not more opened from other job ???



dou fd>=0 or err<>EBUSY;

sleep(1);

fd = open(stmf: O_RDWR + O_SHARE_NONE);

p_err = sys_errno();

enddo;



Thanks

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.