On Tue, 6 May 2025 10:51:14 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request with a new target base due to 
>> a merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Add bug ID
>>  - Merge branch 'master' into JDK-8352533-jspawnhelper-ioexceptions
>>  - Pull message into a field
>>  - Test cases
>>  - Merge branch 'master' into JDK-8352533-jspawnhelper-ioexceptions
>>  - Initial fix
>>    
>>    Good spawnhelper failure message
>>    
>>    Trying tests
>>    
>>    Print helper message on all IOExceptions
>>    
>>    Final
>
> src/java.base/unix/native/libjava/ProcessImpl_md.c line 377:
> 
>> 375:       throwIOExceptionImpl(env, errnum, defaultDetail, "");
>> 376:   }
>> 377: }
> 
> Why only for POSIX_SPAWN? We use jspawnhelper also for fork/vfork+exec.

Er? This is news to me. Where do you see this? I see we only pass the 
`helperpath` (carrying `jspawnhelper` path only to `POSIX_SPAWN` mode:


static pid_t
startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) 
{
    switch (c->mode) {
/* vfork(2) is deprecated on Darwin*/
      #ifndef __APPLE__
      case MODE_VFORK:
        return vforkChild(c);
      #endif
      case MODE_FORK:
        return forkChild(c);
      case MODE_POSIX_SPAWN:
        return spawnChild(env, process, c, helperpath);
      default:
        return -1;
    }
}

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24149#discussion_r2086328349

Reply via email to