| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | RXASYNC - Serial I/O |
On the 03-19-95, Peter Fitzsimmons was chatting with Ian Timms:
PF> IT> As to readwrite_denynone, if the calling program doesn't open the
PF> IT> port in such a way that 'called' programs can use the handle then
PF> IT> there is little point in providing the handle in the first
place.
PF>
PF>Since the handle is being passed, and the port is NOT
PF>being re-opened,deny-none is not required.
Only IF the process is a genuine child. Yes.
PF>In fact, to be
PF>sure no other session comes along to screw things up, the
PF>parent program should be opening the port with "deny
PF>read/write".
If the process is really a child then this would be true, but it
appears to me that MAXIMUS does not start child processes but new
processes in child sessions.
A child process inherits file handles obtained by its parent process,
along with all sharing and access restrictions specified when the
parent opened them. A child process is one which is invoked in the
same 'session' as its parent by using a DosExecPgm call.
Such a child process should be able to read and write to
any of these handles without doing an open call regardless of
the open mode used by the parent. Such child processes however
need to be of the same 'type' as the parent ie. PM, Windowed,
Full screen for them to be openable using DosExecPgm.
If MAXIMUS _does_ use DosExecPgm then mayhap we have tumbled
across a REXXism problem with functions in a DLL not being
able to read and write the inherited handle. I'll try to wip
up a little testbed to see if this is the case.
To start processes of a different type you'd use DosStartSession,
processes started using DosStartSession ARE NOT child processes
of the invoking process, they are seperate processes altogether,
and reside in their very own 'session', this 'session' may/maynot
be a child 'session', but the process started in it can _never_ be
a child of the process which started it. Therefore such a process
can _never_ inherit the file handles from it's 'logical parent'.
Such a process must also perform an open/close on any file it
wishes to use and that file if opened by the 'logical parent'
MUST be opened in OPEN_SHARE_DENYNONE for it to succeed.
PF>The only thing you need to worry about is
PF>OPEN_FLAGS_NOINHERIT, which is NOT the default -- so as
PF>long as you don't specify this you're ok.
Definitely not specified, so I won't worry. ;_)
PS. Pete, if you've got some suggestions as to how I could better
implement RxAsync so that it functions appropriately with Maximus
then I'd be glad to hear them.
Cheers, Ian.
Internet:itimms{at}ariel.ucs.unimelb.edu.au CIS:100236,1404 [Team OS/2]
___
* MR/2 2.1 #141 * OS/2 secures your software investiment!
--- Maximus/2 2.02
* Origin: Bunyip's Cave BBS - +61-3-859-8194 (3:633/379)SEEN-BY: 620/243 624/50 632/103 301 341 348 363 633/379 635/503 640/820 SEEN-BY: 690/660 711/409 410 413 430 807 808 809 934 949 955 712/515 713/888 SEEN-BY: 800/1 7877/2809 @PATH: 633/379 632/348 711/409 808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.