Everything looks correct to me, so I need someone with a little knowledge
to help me out here. I can post the code for anyone willing to have a look.
Thanks,
Kevin Trigg
It's probably best to post the code so we can see what you are sending
for input.
--
Michael Mundy
AS/400 Open Systems Enablement
mmu...@vnet.ibm.com
These opinions are mine and not necessarily those of IBM.
> I am trying to use the spawn() API in a C program on an AS/400 and
> having
> some difficulty. The code returns errno 3021(value specified for
> the
> argument is not correct) and the manuals on the IBM website are a
> little
> short on information regarding exactly how to set up the
> parameters.
> Everything looks correct to me, so I need someone with a little
> knowledge
> to help me out here. I can post the code for anyone willing to
> have a look.
The parameters are quite complex and allow you to do pretty powerful
things.
If you have the CPA Toolkit installed on your system, QCPA library,
issue the command CHGCPATRC *CURRENT *INFO, then call your program that
does spawn. After it fails, use DSPCPATRC from the command line to see
the trace records dumped by some of the posix functions. (Spawn is one
of those that does tracing).
You should be able to search for EINVAL or 3021 and find out what's
wrong.
(This stuff will eventually be in base XPF. Sorry about requiring the
toolkit).
Otherwise, take a look at these:
1) environment parameter: If you have NO environment variables to
inherit, you must still pass an array with 1 NULL entry.
2) Be sure to memset the inhertence structure to 0 before using. (Allows
for us to extend that parameter to do more things in the future, so we
always _REQUIRE_ reserved bits in parameters to be 0).
3) Post the example.
Good Luck.
"Isn't sanity just a one trick pony any way? I mean, all you get is
one trick... rational thinking... But when you're good and crazy,
anything goes!" -- The Tick
Fred Kulack Open Systems Enablement - AS/400 PThreads & Unix APIs
---------------------------------------------------------------------
IBM in Rochester, MN (Phone: 507.253.5982 IBM Tie line 553-5982)
mailto:kul...@us.ibm.com Personal: mailto:kul...@infonet.isl.net
#define DISCLAIMER (The views expressed are mine, not IBM's)