unix - How to use <unistd.h> library in visual stdio? -
i faced os experiment develop unix shell. in order create new process, have use fork()
function. however, fork()
function defined in <unistd.h>
, , can not use in microsoft visual studio. there way solve this?
if using visual studio, means targetting windows...? fork()
not part of windows api, must find way create new process:
- directly use windows api: createprocess
- use cross-platform library (that call
createprocess
on windows ,fork
on linux. have @ boost.process instance (but there's others, qt's qprocess
i personnaly recommand second approach (i use boost.process).
Comments
Post a Comment