Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2001 02:09:19 -0700 (PDT)
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern sys_pipe.c
Message-ID:  <200105080909.f4899Kl98410@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
alfred      2001/05/08 02:09:19 PDT

  Modified files:
    sys/kern             sys_pipe.c 
  Log:
  Remove an 'optimization' I hope to never see again.
  
  The pipe code could not handle running out of kva, it would panic
  if that happened.  Instead return ENFILE to the application which
  is an acceptable error return from pipe(2).
  
  There was some slightly tricky things that needed to be worked on,
  namely that the pipe code can 'realloc' the size of the buffer if
  it detects that the pipe could use a bit more room.  However if it
  failed the reallocation it could not cope and would panic.  Fix
  this by attempting to grow the pipe while holding onto our old
  resources.  If all goes well free the old resources and use the
  new ones, otherwise continue to use the smaller buffer already
  allocated.
  
  While I'm here add a few blank lines for style(9) and remove
  'register'.
  
  Revision  Changes    Path
  1.73      +112 -90   src/sys/kern/sys_pipe.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105080909.f4899Kl98410>