tofro wrote:HOT_GETSTUFF$, however, carries a serious risk of a race condition, as the stuffer buffer is public (and could be changed/cleared by any job anytime). A pointer to a private buffer would be safer.
Sure. Its possible. Cant say Ive ever noticed. Any particular program that youre thinking of that updates the stuffer buffer in the background at any time? Id rather take such programs to task as it seems to me that that is not how the stuffer buffer is meant to be used, considering your valid reservations above.
Clearly, with sloppy programming, one could cause a program using FSEL to omit getting its file name from the stuffer buffer immediately on exiting FSEL, thus allowing another instance, or a different program, to interfere, resulting in the first program ending up with the wrong file name. But I wouldnt recommend that kind of programming
Anyway, wherever that is feared to be a problem theres always option 2. as described in a previous post.