| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| X-Trace-PostClient-IP: | 68.147.131.211 |
| From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT Invalid> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Using DR-DOS fork in DJGPP |
| Organization: | Systematic Software |
| Message-ID: | <f7f2b0tp6atvgj7rgqg83bo9mo2asdsndf@4ax.com> |
| References: | <uoeok2abs DOT fsf AT gnu DOT org> <4d201f78 DOT 0405191158 DOT 63550b51 AT posting DOT google DOT com> <7704-Wed19May2004233123+0300-eliz AT gnu DOT org> <4d201f78 DOT 0405191847 DOT 6697f90d AT posting DOT google DOT com> <u3c5vbous DOT fsf AT gnu DOT org> <4d201f78 DOT 0405200540 DOT 307bb15a AT posting DOT google DOT com> <9743-Thu20May2004201223+0300-eliz AT gnu DOT org> <4d201f78 DOT 0405210913 DOT 26a5ffcb AT posting DOT google DOT com> <uwu33ad61 DOT fsf AT gnu DOT org> <4d201f78 DOT 0405230527 DOT 3f17fb4b AT posting DOT google DOT com> <2719-Sun23May2004185224+0300-eliz AT gnu DOT org> |
| X-Newsreader: | Forte Agent 1.93/32.576 English (American) |
| MIME-Version: | 1.0 |
| Lines: | 33 |
| Date: | Mon, 24 May 2004 00:11:44 GMT |
| NNTP-Posting-Host: | 24.71.223.147 |
| X-Complaints-To: | abuse AT shaw DOT ca |
| X-Trace: | pd7tw3no 1085357504 24.71.223.147 (Sun, 23 May 2004 18:11:44 MDT) |
| NNTP-Posting-Date: | Sun, 23 May 2004 18:11:44 MDT |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
On Sun, 23 May 2004 18:52:25 +0200 in comp.os.msdos.djgpp, "Eli
Zaretskii" <eliz AT gnu DOT org> wrote:
>> From: 048321887-0001 AT t-online DOT de (Udo Kuhnt)
>> Newsgroups: comp.os.msdos.djgpp
>> Date: 23 May 2004 06:27:29 -0700
>>
>> If a file had been opened by the parent process, it should also be open for
>> the child process which can access it using the same handle. If the child
>> closes the file in its VM using the handle, it will still be open in the
>> parent's VM.
>
>And the latter means that just copying is not good: it is a frequent
>case that the child closes one or more of inherited handles that it
>doesn't need. You don't want that to invalidate the handle in the
>parent, since existing programs don't expect such a calamity.
>
>Se perhaps writing a (16-bit real-mode) program to test this aspect
>would be a useful first step.
Copying the VM is not sufficient: the OS also has to know which file
handles the parent process has open, and set up the child process so
that it has the same open file handles.
Alternatively, the fork routine, after copying the VM, has to look at
the child process' file handle table, and reestablish the open file
handles.
Similarly with any other OS resources the child is to "inherit".
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca)
fake address use address above to reply
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |