hi all,

i am trying to spawn a process using spawn() API, i have pasted code
snippets below and also the error.

#include <spawn.h>
#include <sys/errno.h>
#include <qp0z1170.h>

extern char **environ;

void main()
pid_t child_pid;
char pgm_nam[] = "/qsys.lib/srikanth.lib/fileio.pgm";
char **envVars;
struct inheritance inherit = {0};
envVars = environ;

inherit.pgroup = SPAWN_NEWPGROUP;
inherit.flags    = SPAWN_SETPGROUP;

child_pid = spawn(pgm_nam,


i am getting error "invalid argument", after calling spawn(); child_pid = -1
and value in errno = 3021. i am not able to figure out which argument i have
passed is wrong.
also if somebody has any literature/documents on process and thread related
programming, it will be great of great help if you can forward them to me.

kindly help.

thanks in advance.
srikanth d
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].