There's two ways to do it:Quote:> I have a -multithreaded- application that currently runs on NT, Win 98,
> and OS/2. I would like to port it to Linux but am not familiar with
> the Linux (or Unix) implementation of multitasking. I can see that
> a "child process" can be launched. But can I launch another thread of
> execution that has both read and write access to the parent process's
> memory and file handles?
fork (to fire off a child), which you've already discovered. and
pthreads (POSIX Threads), which are threading like you're mostly familiar
with. Pthreads is available for pretty much all unixes which support
threading, and many non-unixes as well. The linux implementation is
linuxthreads, and is available via most distributions. As a side note,
at the system level, linux provides a "clone" system call which is the
implementation for linuxthreads *and* fork.
Oh, you mean so it crashes? :) J/K. You're not wanting "windowsQuote:
> General Question: Can I implement windows style multitasking on top of
style multitasking", you're actually wanting multithreading (which was
*not* created by microsoft).
Nope, and you don't want to, since it is an efficiency boost. inQuote:
> Particular Question: Can I suppress Linux's "copy on write" approach
> to forking?
multithreaded apps, the shared pages aren't CoW, so no problem.
What kind of app is it?Quote: