Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6213621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:43:46+00:00 2026-05-24T06:43:46+00:00

Quoted from Wikipedia: The Microsoft Windows spawn functions are inspired by Unix functions fork

  • 0

Quoted from Wikipedia:

The Microsoft Windows spawn functions are inspired by Unix functions
fork and exec; however, as Windows does not support fork (at least in
the Win32 API; POSIX emulation environments such as Cygwin or SFU do),
the spawn function was supplied as a replacement for the fork-exec
combination.

However, the spawn function, although it deals adequately with the
most common use cases, lacks the full power of fork-exec, since after
fork any process settings which will survive an exec may be changed
.
However, in most cases, this deficiency can be made up for by using
the more low-level CreateProcess API.

I was wondering how to understand the reason that Windows spaw() is weaker than Unix fork-exec: “after fork any process settings which will survive an exec may be changed”?

When does the “change” to some process settings happen: between fork and exec or after exec?

In a child process, will the environment variables inherited from its parent process survice exec?

Are there some examples?

Thanks and regards!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:43:47+00:00Added an answer on May 24, 2026 at 6:43 am

    The “change” will happen between the fork() and exec(). Quite a lot of the process state is inherited across an exec, see http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html . In particular, file descriptors are inherited (unless they have the close-on-exec bit set).

    Typically one uses pipe() and the dup() family of calls to set up pipes and redirect file descriptors. E.g. connecting standard input and output of the child process to a pipe so that the parent process can communicate with the child.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quoted from here : If delimiter contains a value that is not contained in
I have heard of several things, quoted from Wikipedia: Java Runtime Environment, A JVM
I am trying to extract a quoted text from an html response. However when
Quote from Wikipedia : A public key token. This is a 64-bit hash of
Quote from Jason Coco it not possible to set multiple in UILabel... but how
Quoted from this page : send(url: String, target: String, [method: String]) Sends the variables
The image above is from Wikipedia's entry on AVL trees which Wikipedia indicates is
Quoted from ngx_hash.c : ngx_strlow(elt->name, names[n].key.data, names[n].key.len); Which copies the lower case string to
Quoted from mysql.pm : 3 package DBD::mysql; 4 use strict; 。。。。 17 $err =
Should numbers from user input be quoted in MySQL queries to help avoid SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.