*BSD News Article 85870


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!ames!enews.sgi.com!news.mathworks.com!news.sprintlink.net!news-peer.sprintlink.net!news.sprintlink.net!news-pull.sprintlink.net!news.sprintlink.net!news-pen-15.sprintlink.net!imp.ch!sunqbc.risq.net!news1.bellglobal.com!sympatico.ca!not-for-mail
From: gbuchanan@localhost.on.sympatico.ca (Gardner Buchanan)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Xinu Problem
Date: 31 Dec 1996 00:59:20 GMT
Organization: Sympatico
Lines: 23
Message-ID: <5a9oh8$75b$1@news1.sympatico.ca>
References: <32C6CD63.38A9@hkstar.com>
Reply-To: gbuchanan@sympatico.ca
NNTP-Posting-Host: ppp1917.on.sympatico.ca
X-Newsreader: knews 0.9.3
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33304

Is there a xinu newsgroup?
Ignoring the fact that this is absolutely not the right newsgroup...

In article <32C6CD63.38A9@hkstar.com>,
	Andrew Liu <tlliu@hkstar.com> writes:
>Dear All,
>
>do u know How to append some data to the exist file?
>In fact, I want to update a txt file and not erase the old context of
>the existing file.
>In turboC, i can use the command fopen("c:\\test.txt","a"); But in the
>Xinu system, I don't know how to do it. I really need your help.....
>

According to Comer 1984, page 312, Xinu allows at most one process
to access a file at a given time.  Therefore, you can open the
file, seek to the end and start writing.  Net result is like append,
since no one else can write to the file at the same time as you.

============================================
Gardner Buchanan    <gbuchanan@sympatico.ca>
Ottawa, ON