unistd.h is not available, How to use fork()
Pergunta
I want to exercise some UNIX commands using C language. When I include <unistd.h>
header file and when I use fork()
method it gives me a compile time error: "can not include unistd.h"
. I check on he Internet and the fork()
method is available in <unistd.h>
header file only. Please help me on this.
- Is now
<unistd.h>
is replaced with any other header file? - Even if I use
"process.h"
, that does not have a definition forfork()
. - How I can use
fork()
method?
I have DOSBox v0.74 on my system (Windows 7, 64-bit).
Outras dicas
There is no easy way of emulating fork() on win32 or dos.
You always can declare anything yourself: pid_t fork(void); However, if your system don't have unistd.h, it isn't POSIX compliant (or you haven't installed headers at all).
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow