[Info-vax] Looking into C-include files on VMS
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Mon Nov 9 14:20:05 EST 2009
In article <oNmdnU_-cdwT3WXXnZ2dnUVZ_t6dnZ2d at giganews.com>, "Richard B. Gilbert" <rgilbert88 at comcast.net> writes:
>Joerg Schilling wrote:
>> In article <7llbk1F3eetdpU1 at mid.individual.net>,
>> Bill Gunshannon <billg999 at cs.uofs.edu> wrote:
>>
>>> Then, what exactly is the reason VMS can't do a Unix style fork()?
>>
>> It would help a lot already if vfork() on VMS did work like vfork()
>> and did not share file descriptors between parent and child.
>>
>> More then 90% of all calls to fork() do this with the intention to
>> call exec*() soon, but many of these calls like to redirect I/O
>> for the new process.
>>
>> With a real vfork() you may use vfork() in all these cases as long as
>> you do not use stdio in the child and as long as you call _exit()
>> instead of exit() in the child in case if a problem. On VMS, you would
>> need to dup2() descriptors 0/1/2 to other numbers before redirecting
>> 0/1/2 for the new process _and_ you would need to restore 0/1/2 in the
>> parent. The latter makes it hard to suport I/O redirection in typical
>> software.
>>
>
>Learn to live with it. VMS doesn't have fork() or vfork() because it
>works without either one. VMS has been in use for about thirty years
>now without fork(). I learned to program without fork() on IBM
>System/360, moved to H-P 2100 series without fork() and then to VAX/VMS
>still without fork(). I even managed to write a few programs for
>Silicon Graphics IRIX without using fork.
Exactly! That's why the effort is called "porting" and not "compiling and
linking". If there is something that doesn't exist to support the feature,
the person "porting" the code needs to redesign/recode that portion of code.
The end results should be the same. Get the fork out of there and rewrite
the code to work with some other scheme supported in the OS.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
http://www.quirkfactory.com/popart/asskey/eqn2.png
"Well my son, life is like a beanstalk, isn't it?"
More information about the Info-vax
mailing list