HI carlsonj:
   thanks for your reply.
   I have another questions on posix_spawnp then; there are following code in 
it.
I want to know why when there is format error, the code still try to use 
/bin/sh to execute it. it the code was written in perl or something else, it 
will gives error result. So I think there is no need to do this.
    376                 if (set_error(&error, errno) == ENOEXEC) {
    377                         newargs[0] = (char *)shell;
    378                         newargs[1] = path;
    379                         for (i = 1; i <= argc; i++)
    380                                 newargs[i + 1] = argv[i];
    381                         (void) set_error(&error, 0);
    382                         (void) execve(xpg4? xpg4_path : sun_path,
    383                             newargs, envp);
    384                         if (sap != NULL &&
    385                             (sap->sa_psflags & 
POSIX_SPAWN_NOEXECERR_NP))
    386                                 _exit(127);
    387                         (void) set_error(&error, errno);
    388                         _exit(_EVAPORATE);
    389                 }
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to