| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Sharing problemo`s.... |
Tuesday December 07 1993 01:35, david nugent wrote to Jason Lingohr:
>> My question is basically this: is it
>> silly/dangerous/stupid/insane to mix file handles and
>> buffered, high-level I/O??
dn> It can be done safely (although not portably), but there are some gotchas.
dn> It depends on what you're "mixing".
Ahhhh, the usual answer of any good, knowledgable programmer!!
dn> Why not use fsopen() or fdopen() or similar - it obviously depends what
dn> your library has, neither are ISO functions, but most MSDOS compilers have
dn> them.
Well, basically, to quote from my trusty Waite Group's Turbo C Bible,
fdopen() shouldn't be used when a low-level file has been opened in a
sharing mode. Their reason is that buffered I/O with a shared file
basically defeats the whole purpose of file-sharing - at any one time the
physical file is not 100% up to date with high-level, which, I guess makes
sense.... sigh.
Although the funniest bit about all this is that the files I'm opening for
sharing are only read mode anyhow - RemoteAccess and D'Bridge paramater
files, for things such as log filenames etc.... man, I've spent too many
hours on this project!!
Other than that, it doesn't mention any "trap bugs" that might
occur, just the non-Vulcan illogic in the whole idea of buffered I/O and
shared files.
dn> Does it work on a network _without_ using shared opens?
I don't believe so.
>> Got any resolutions?
dn> Without knowing the cause of the problem, it's a little difficult to
dn> solve. :-)
Well, I'd tell you the cause too, but that's what I'm trying to discover -
I'll go away now, back to my hole in the corner and try using fdopen...
Jason Lingohr, 201:300/320 - jason.lingohr{at}dbridge.com
LingSoft Developments BBS - +61-3-770-1093 300-14.4k V.32b/V.42b
jason{at}csource.oz.au
lingman{at}yoyo.cc.monash.edu.au
--- DB 1.54/034517
* Origin: Remember when you were young, you shone like the sun (3:632/523)SEEN-BY: 50/99 54/54 620/243 622/405 623/630 632/0 107 304 309 328 348 393 SEEN-BY: 632/518 521 523 998 999 1000 633/371 634/383 384 391 635/210 502 SEEN-BY: 635/503 544 550 570 636/100 670/206 301 711/409 430 807 808 809 932 SEEN-BY: 711/934 712/623 713/888 714/906 800/1 @PATH: 632/523 998 635/503 50/99 54/54 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™.