当前位置:首页>Linux>[LNX013] 进程和线程的区别?可 Linux 根本就没有线程

[LNX013] 进程和线程的区别?可 Linux 根本就没有线程

  • 2026-08-18 23:10:32
[LNX013] 进程和线程的区别?可 Linux 根本就没有线程

进程和线程有区别吗?

操作系统教材有标准答案,面试八股文也有全面的总结

但是 Linux 系统有线程吗?

fork() 创建的是进程,pthread_create() 创建的就是线程吗?

glibc 的源码告诉我们它们创建的都是进程,没有线程

glibc fork() 函数实现

fork() 函数是 userspace 函数,并不是系统调用,虽然 Linux 系统提供了 fork 系统调用,但是 glibc 并没有使用 fork 系统调用实现 fork() 函数

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/posix/fork.c#L40

pid_t
__libc_fork (void)
{
  // ...

  lastrun = __run_prefork_handlers (multiple_threads);
  // ...

  pid_t
 pid = _Fork ();

  if
 (pid == 0)
    {
      // ...

      __run_postfork_handlers (atfork_run_child, multiple_threads, lastrun);
    }
  else

    {
      // ...

      __run_postfork_handlers (atfork_run_parent, multiple_threads, lastrun);

      if
 (pid < 0)
    __set_errno (save_errno);
    }

  return
 pid;
}
strong_alias (__libc_fork, __fork)
libc_hidden_def (__fork)
weak_alias (__libc_fork, fork)

_Fork() 封装了平台相关的实现

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/sysdeps/nptl/_Fork.c#L25

pid_t
_Fork (void)
{
  /* Block all signals to avoid revealing the inconsistent TCB state
     to a signal handler after fork.  The abort lock should AS-safe
     to avoid deadlock if _Fork is called from a signal handler.  */

  internal_sigset_t
 original_sigmask;
  __abort_lock_rdlock (&original_sigmask);

  pid_t
 pid = arch_fork (&THREAD_SELF->tid);
  if
 (pid == 0)
    {
      // ...

    }

  __abort_lock_unlock (&original_sigmask);
  return
 pid;
}

最后可以看到,fork() 函数调用 clone 系统调用

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/sysdeps/unix/sysv/linux/arch-fork.h#L35

static inline pid_t
arch_fork
 (void *ctid)
{
  const
 int flags = CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD;
  long
 int ret;
#ifdef __ASSUME_CLONE_BACKWARDS

# ifdef INLINE_CLONE_SYSCALL

  ret = INLINE_CLONE_SYSCALL (flags, 0, NULL, 0, ctid);
# else

  ret = INLINE_SYSCALL_CALL (clone, flags, 0, NULL, 0, ctid);
# endif

#elif defined(__ASSUME_CLONE_BACKWARDS2)

  ret = INLINE_SYSCALL_CALL (clone, 0, flags, NULL, ctid, 0);
#elif defined(__ASSUME_CLONE_BACKWARDS3)

  ret = INLINE_SYSCALL_CALL (clone, flags, 0, 0, NULL, ctid, 0);
#elif defined(__ASSUME_CLONE_DEFAULT)

  ret = INLINE_SYSCALL_CALL (clone, flags, 0, NULL, ctid, 0);
#else

# error "Undefined clone variant"

#endif

  return
 ret;
}

glibc pthread_create() 函数实现

pthread_create() 也同样调用 clone 系统调用

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/nptl/pthread_create.c#L784

int
__pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,
             void
 *(*start_routine) (void *), void *arg)
{
  void
 *stackaddr = NULL;
  size_t
 stacksize = 0;

  // ...

  const
struct pthread_attr *iattr = (struct pthread_attr *) attr;
  // ...

struct pthread *pd =
 NULL;
  // 分别栈空间

  int
 err = allocate_stack (iattr, &pd, &stackaddr, &stacksize);
  int
 retval = 0;
  // ...

  pd->start_routine = start_routine;
  pd->arg = arg;
  pd->c11 = c11;
  // ...

  pd->schedpolicy = self->schedpolicy;
  pd->schedparam = self->schedparam;
  // ...

  /* Start the thread.  */

  if
 (__glibc_unlikely (report_thread_creation (pd)))
    {
      // ...

    }
  else

    retval = create_thread (pd, iattr, &stopped_start, stackaddr,
               stacksize, &thread_ran);
  // ...

  return
 retval;
}
versioned_symbol (libc, __pthread_create_2_1, pthread_create, GLIBC_2_34);
libc_hidden_ver (__pthread_create_2_1, __pthread_create)
#ifndef SHARED

strong_alias (__pthread_create_2_1, __pthread_create)
#endif

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/nptl/pthread_create.c#L234

static int create_thread (struct pthread *pd, const struct pthread_attr *attr,
              bool
 *stopped_start, void *stackaddr,
              size_t
 stacksize, bool *thread_ran)

{
  // ...

  /* We rely heavily on various flags the CLONE function understands:

     CLONE_VM, CLONE_FS, CLONE_FILES
    These flags select semantics with shared address space and
    file descriptors according to what POSIX requires.

     CLONE_SIGHAND, CLONE_THREAD
    This flag selects the POSIX signal semantics and various
    other kinds of sharing (itimers, POSIX timers, etc.).

     CLONE_SETTLS
    The sixth parameter to CLONE determines the TLS area for the
    new thread.

     CLONE_PARENT_SETTID
    The kernels writes the thread ID of the newly created thread
    into the location pointed to by the fifth parameters to CLONE.

    Note that it would be semantically equivalent to use
    CLONE_CHILD_SETTID but it is be more expensive in the kernel.

     CLONE_CHILD_CLEARTID
    The kernels clears the thread ID of a thread that has called
    sys_exit() in the location pointed to by the seventh parameter
    to CLONE.

     The termination signal is chosen to be zero which means no signal
     is sent.  */

  const
 int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SYSVSEM
               | CLONE_SIGHAND | CLONE_THREAD
               | CLONE_SETTLS | CLONE_PARENT_SETTID
               | CLONE_CHILD_CLEARTID
               | 0);

  TLS_DEFINE_INIT_TP (tp, pd);

struct clone_args args =

    {
      .flags = clone_flags,
      .pidfd = (uintptr_t) &pd->tid,
      .parent_tid = (uintptr_t) &pd->tid,
      .child_tid = (uintptr_t) &pd->joinstate,
      .stack = (uintptr_t) stackaddr,
      .stack_size = stacksize,
      .tls = (uintptr_t) tp,
    };
  int
 ret = __clone_internal (&args, &start_thread, pd);
  // ...


  return
 0;
}

__clone_internal() 处理 clone 和 clone3 系统调用:如果有 clone3 系统调用,就尝试,否则使用 clone 系统调用

https://elixir.bootlin.com/glibc/glibc-2.43.9000/source/sysdeps/unix/sysv/linux/clone-internal.c#L95

int
__clone3_internal (struct clone_args *cl_args, int (*func) (void *args),
           void
 *arg)
{
#ifdef HAVE_CLONE3_WRAPPER

# if __ASSUME_CLONE3

  return
 __clone3 (cl_args, sizeof (*cl_args), func, arg);
# else

  static
 int clone3_supported = 1;
  if
 (atomic_load_relaxed (&clone3_supported) == 1)
    {
      int
 ret = __clone3 (cl_args, sizeof (*cl_args), func, arg);
      if
 (ret != -1 || errno != ENOSYS)
    return
 ret;

      atomic_store_relaxed (&clone3_supported, 0);
    }
# endif

#endif

  __set_errno (ENOSYS);
  return
 -1;
}

int

__clone_internal (struct clone_args *cl_args,
          int
 (*func) (void *arg), void *arg)
{
#ifdef HAVE_CLONE3_WRAPPER

  int
 saved_errno = errno;
  int
 ret = __clone3_internal (cl_args, func, arg);
  if
 (ret != -1 || errno != ENOSYS)
    return
 ret;

  /* NB: Restore errno since errno may be checked against non-zero
     return value.  */

  __set_errno (saved_errno);
#endif


  return
 __clone_internal_fallback (cl_args, func, arg);
}

clone 系统调用创建的是进程还是线程?

https://www.man7.org/linux/man-pages/man2/clone.2.html

clone, __clone2, clone3 - create a child process

clone 系统调用创建的是进程,flag 控制了子进程和父进程共享的资源

flag
含义
CLONE_CHILD_CLEARTID
在子进程退出时,将其 child_tid 指针指向的内存清零,并唤醒该地址上的 futex
CLONE_CHILD_SETTID
在子进程的内存中,将子进程的线程 ID (TID) 存储到 child_tid 指针指向的位置
CLONE_CLEAR_SIGHAND (since Linux 5.5)
将子进程中所有被父进程捕获的信号重置为默认行为 (SIG_DFL)。不能与 CLONE_SIGHAND 同时使用
CLONE_DETACHED
历史遗留标志,现已基本被忽略。其功能已被 CLONE_THREAD 取代
CLONE_FILES
父子进程共享文件描述符表。一个进程对文件描述符的操作(如打开、关闭)会影响另一个进程
CLONE_FS
父子进程共享文件系统信息,包括根目录、当前工作目录和 umask
CLONE_INTO_CGROUP (since Linux 5.7)
允许将子进程直接创建在由 cl_args.cgroup 指定的 cgroup v2 中
CLONE_IO (since Linux 2.6.25)
父子进程共享 I/O 上下文,使 I/O 调度器将它们视为一个整体进行调度,可能提升 I/O 性能
CLONE_NEWCGROUP (since Linux 4.6)
在新的 cgroup 命名空间中创建子进程。需要 CAP_SYS_ADMIN 权限
CLONE_NEWIPC (since Linux 2.6.19)
在新的 IPC 命名空间中创建子进程,隔离进程间通信资源。需要 CAP_SYS_ADMIN 权限
CLONE_NEWNET (since Linux 2.6.24)
在新的网络命名空间中创建子进程,拥有独立的网络设备、IP 地址等。需要 CAP_SYS_ADMIN 权限
CLONE_NEWNS (since Linux 2.4.19)
在新的挂载命名空间中启动子进程,实现文件系统视图的隔离。需要 CAP_SYS_ADMIN 权限
CLONE_NEWPID (since Linux 2.6.24)
在新的 PID 命名空间中创建子进程,子进程在该命名空间中 PID 为 1。需要 CAP_SYS_ADMIN 权限
CLONE_NEWUSER (since Linux 2.6.23)
在新的用户命名空间中创建子进程,实现用户和组 ID 的隔离。从 Linux 3.8 起无需特权
CLONE_NEWUTS (since Linux 2.6.19)
在新的 UTS 命名空间中创建子进程,允许拥有独立的主机名和域名。需要 CAP_SYS_ADMIN 权限
CLONE_PARENT
新子进程的父进程将是调用进程的父进程,使两者成为“兄弟”关系
CLONE_PARENT_SETTID
在父进程的内存中,将子进程的线程 ID (TID) 存储到 parent_tid 指针指向的位置
CLONE_PID
历史遗留标志,曾用于让子进程与父进程拥有相同的 PID。已在 Linux 2.5.16 中移除,其位被 CLONE_PIDFD 复用
CLONE_PIDFD (since Linux 5.2)
创建一个指向子进程的 PID 文件描述符 (pidfd),并存入 pidfd 指针指向的位置,用于后续进程管理
CLONE_PTRACE
如果父进程正在被调试,则子进程也会被同一个调试器跟踪
CLONE_SETTLS
为子进程设置线程局部存储 (TLS)
CLONE_SIGHAND
父子进程共享信号处理程序表。一个进程对信号处理方式的修改会影响另一个进程
CLONE_STOPPED
已废弃。曾用于让子进程创建后处于停止状态,需 SIGCONT 信号恢复
CLONE_SYSVSEM
父子进程共享 System V 信号量调整 (semadj) 值的列表
CLONE_THREAD
将子进程放入与父进程相同的线程组,共享同一个进程 ID (PID/TGID)。这是实现 POSIX 线程的关键
CLONE_UNTRACED
阻止调试器强制对这个子进程进行跟踪
CLONE_VFORK
挂起父进程的执行,直到子进程调用 execve() 或 _exit() 释放其虚拟内存资源
CLONE_VM
父子进程共享同一块内存空间。一个进程对内存的修改对另一个进程立即可见

fork() 和 pthread_create() 本质上创建的都是进程,pthread_create() 的 flag 中控制了子进程和父进程共享资源

  • • 共享信号处理程序表
  • • 共享同一块虚拟内存空间
  • • 共享文件系统信息
  • • 共享文件描述符表
  • • 共享 System V 信号量的调整值列表

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 18:50:22 HTTP/2.0 GET : https://f.mffb.com.cn/a/504699.html
  2. 运行时间 : 0.273242s [ 吞吐率:3.66req/s ] 内存消耗:5,249.04kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=148ac454c355e8f813d1b7b7ecf8d5e2
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.001118s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001502s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000725s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000696s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001365s ]
  6. SELECT * FROM `set` [ RunTime:0.000728s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001588s ]
  8. SELECT * FROM `article` WHERE `id` = 504699 LIMIT 1 [ RunTime:0.001163s ]
  9. UPDATE `article` SET `lasttime` = 1787309422 WHERE `id` = 504699 [ RunTime:0.006188s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000595s ]
  11. SELECT * FROM `article` WHERE `id` < 504699 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001294s ]
  12. SELECT * FROM `article` WHERE `id` > 504699 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001112s ]
  13. SELECT * FROM `article` WHERE `id` < 504699 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.004205s ]
  14. SELECT * FROM `article` WHERE `id` < 504699 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.067430s ]
  15. SELECT * FROM `article` WHERE `id` < 504699 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.020797s ]
0.276966s