You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/12/30 08:33:04 UTC

[GitHub] [dolphinscheduler] VanHelxing commented on issue #13307: [Bug] java.lang.NoSuchFieldException: pid

VanHelxing commented on issue #13307:
URL: https://github.com/apache/dolphinscheduler/issues/13307#issuecomment-1367792598

   `/**
        * get process id
        *
        * @param process process
        * @return process id
        */
       private int getProcessId(Process process) {
           int processId = 0;
   
           try {
               // Error in this position
               Field f = process.getClass().getDeclaredField(TaskConstants.PID);
               f.setAccessible(true);
   
               processId = f.getInt(process);
           } catch (Throwable e) {
               logger.error(e.getMessage(), e);
           }
   
           return processId;
       }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org