[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fixing debconf stdin bug



On Sat, 10 Jan 2004, Blars Blarson wrote:
> Joey Hess beleives that this patch will cause problems for postinst
> scripts that don't do db_stop before starting a daemon.  There appear

Any "daemon" that does NOT close all fds on startup is buggy (unless it is
in debug mode, or it is not a normal daemon to begin with).

Unfortunately, the only way AFAIK to do so is to do a { for all descriptors
in (insert arbitrary range here, I use 255): close it ignoring errors }
loop.  Icky at best :(

I wish daemon() would do this.  Stupid do-it-halfway function... 

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: