BUG REPORT
DATE: 10 AUG 2003
PLATFORM: QNX 6.2.1 (All)
FROM: John Nagle / Team Overbot / nagle@overbot.com
SEVERITY: Mildly annoying.
DESCRIPTION
In include file <spawn.h> and associated library:
The last two arguments to "spawn are
char * const argv[ ]
char * const envp[ ]
They should be
const char * const argv[ ]
const char * const envp[ ]
You can’t pass a constant string to spawn given the
current definition. Spawn never stores into those strings
(if it does, that’s a bug) so they should be fully constant.
This comes up in practice when the underlying string
is inside a C++ “string”, accessed via “c_str()”, so
there’s an annoying C++ incompatibility.
John Nagle