Library that has reference to fork() in C

前端 未结 2 1925
自闭症患者
自闭症患者 2021-01-13 01:08

What is the library that defines fork(). I am learning to use fork(). I found out that the Standard I/O Library : stdio.h is enough for fork() to work but that

相关标签:
2条回答
  • 2021-01-13 01:23

    I am using gcc in Code::Blocks on Windows 8 Pro

    You don't have fork on windows. You can use cygwin or something like that though.

    0 讨论(0)
  • 2021-01-13 01:35

    The C standard library (glibc) implements fork() which calls a UNIX/Linux-specific system call eventually to create a process, on Windows, you should use the winapi CreateProcess() see this example in MSDN.

    Note: Cygwin fork() is just a wrapper around CreateProcess() see How is fork() implemented?

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题