| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Help a frustrated Notes |
JD> > I have written a program that takes the place of $backgnd, gets called by > $lnotes, twiddles the modem, and then calls the original > $backgnd. Right now, $backgnd is complaining because it > can't get access to the comm port. What I think I'm missing > is either the process of sharing a comm port between > processes, or the process of inheriting a comm port from a > process, so I need to see a relevant example of each. JD> Inheritance of open file handles is done for you by OS/2. All that you need to do is to somehow transfer the number of the handle that is being inherited from parent to child (most BBS softwares do this with a command line option that simply contains a number). If, however, the child process opens the COM device explicitly, then you need to ensure that you open it with the correct share modes in DosOpen(). OPEN_SHARE_DENYNONE seems like a good bet here. One thing to remember is that any handles opened by your intermediary process at the point that you call spawn (or DosExecPgm) will be open in $backgnd. More importantly, they will *remain open* in the child even if you close them in the parent. If this causes sharing problems (i.e. it $backgnd requires that no other processes have the COM device open) then ensure that you turn on the "no inherit" flag when you open the COM device. Since we use Notes at the office along with replication between servers, I'd be interested in passing details of your fix along to the relevant admin people at work when you complete it. > JdeBP < ___ X MegaMail 2.10 #0: --- Maximus/2 3.00* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4) SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 440/4 141/209 270/101 105/103 42 712/515 711/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™.