def is_process_started_by_init():
 result = False
 init_pid = 1
 if (os.getppid() == init_pid):
  result = True
 return result

def is_process_started_by_init ( ) : result = False init_pid = 1 if ( os . getppid ( ) == init_pid ) : result = True return result
determine if the current process is started by init .