From: alan@nabeth.cxo.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
Subject: Re: how to get around memory mapped file in Ultrix
Date: Thu, 29 Apr 1993 00:07:05 GMT [thread overview]
Message-ID: <1993Apr29.000705.26981@nntpd2.cxo.dec.com> (raw)
In-Reply-To: 1993Apr28.140912.4403@alw.nih.gov
In article <1993Apr28.140912.4403@alw.nih.gov>, howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung) writes:
>
> [ I believe this is the original author who has discovered that
> ULTRIX doesn't support mmap and family. ]
>
>That's not a good news to me.
>Actually, the program isn't written by me. I guess the original
>author is trying to map a protion of memeory to an output file.
>
>Is there an equivalent function in Ultrix c which do the same
>thing, or any ways to get around this?
It depends exactly what "this" is. If the intent is to have a
chunk of what's in memory end up in a file, then the good old
fashioned way is likely to work:
if((fd = open("file", O_WRONLY)) == -1 )
/* handle error */
else {
rc = write(fd, buffer, size) ;
if( rc != WHAT_IS_EXPECTED )
/* handle that error */
if( close(fd) == -1 )
/* Handle that error */
}
If there is more going on than simply moving bytes of memory to a file,
then a more complex solution may be necessary.
>
>
--
Alan Rollow alan@nabeth.cxo.dec.com
next prev parent reply other threads:[~1993-04-29 0:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-04-28 14:09 how to get around memory mapped file in Ultrix Howard Wai-Chun Yeung
1993-04-29 0:07 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds. [this message]
1993-04-29 1:58 ` Marcus J Ranum
1993-05-03 8:29 ` Ron Jarrell
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox