mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.58k stars 2.38k forks source link

Avoid executing unnecessary fork() #147

Open segfauIt opened 1 year ago

segfauIt commented 1 year ago

Ignore blank string, e.g.,

  1. '\n'
  2. ' \n'
  3. '\t \n'

Fork() needs to execute a lot of instructions, especially before copy-on-write is supported.