Not C++ like boost::process or Qt but plain C. Is there any open-source cross-platform C library for working with processes?
Asked
Active
Viewed 136 times
2
-
2What is a "process library"? – Dec 12 '12 at 20:15
-
Also, correct me if I'm wrong, but isn't `fork()` and `exec()` good enough from the standard library? – Dec 12 '12 at 20:18
-
@H2CO3: `fork()` on windows?) – myWallJSON Dec 12 '12 at 20:19
-
You might also need wait() and friends and maybe pause() and setgid() and friends – wildplasser Dec 12 '12 at 20:19
-
1@myWallJSON I practically don't care Microsoft writes nonstandard [software] crap :P – Dec 12 '12 at 20:20
-
and if possible `close/kill` – myWallJSON Dec 12 '12 at 20:20
-
@H2CO3: thats why I seek for a crossplatform one=) for WINDOWS, LINUX AND MAC=)) – myWallJSON Dec 12 '12 at 20:21
-
2Windows is not a platform. It is a *software ecosystem* (with only one top-predator: Steve Ballmer) – wildplasser Dec 12 '12 at 20:22
-
2@wildplasser neither one. Windows is an antipattern. – Dec 12 '12 at 20:23
-
1I guess we could form the *gang of two* here ... Famous Henry Spencer quote: *anyone who ignores unix is doomed to reinvent it. Poorly* – wildplasser Dec 12 '12 at 20:24
-
You could use preprocessor macros to call the right function for every system. – Ramy Al Zuhouri Dec 12 '12 at 20:28
2 Answers
1
glib (think Gnome) is the peer of Qt (think Kde) but being written in C. There is a section titled Spawning Processes that may be of interest.

Steve-o
- 12,678
- 2
- 41
- 60
1
Depending on what you're trying to achieve and what you mean by "cross platform", you could write everything to target POSIX and just use Cygwin for your Windows port. I think that covers Linux, Unix, OSX (aka BSD), and Windows XP - Win 7, and any RTOS with a POSIX layer (e.g. QNX). Not sure if Cygwin works on Win 8.

Community
- 1
- 1

Brian McFarland
- 9,052
- 6
- 38
- 56