[Pkg-sysvinit-devel] Bug#584102: startpar: Fail if fd 0 is strange	tty
    Dr. Werner Fink 
    werner at suse.de
       
    Mon Jun  7 15:13:11 UTC 2010
    
    
  
On Mon, Jun 07, 2010 at 04:49:39PM +0200, Petter Reinholdtsen wrote:
> [Dr. Werner Fink]
> > That is a guess but nevertheless the attributes are used to set them
> > also to the pty/tty pairs used for parallel boot.  As stdout of
> > startpar can be used for a shell script parser (without option -M)
> > the stdio was guessed to be a real tty.
> 
> Right.
> 
> Any idea how to get parallel booting working also when stdin and
> stdout is a pipe, like it is with OpenVZ at the moment?
Hmmm ... stderr maybe, something like
  FILE* io[3];
  int notty = 1;
  io[0] = stdin;
  io[1] = stdout;
  io[2] = stderr;
  io[3] = NULL;
  for (n=0; io[n]; n++) {
    int fd = isatty(fileno(io[n]));
    if (tcgetattr(fd, &tio) == 0) {
	notty = 0
	break;
    }
  }
could work.
Btw: I've lost your mail
 Alternative startpar implementation - live-net-startpar
please resend.  Beside any startpar it could be an option
to use a directory based boot scheme as insserv aloready
uses a tsort which can be mapped on `directory' based
sorting scheme.  Could work simliar like the process_path()
routine of simpleinit ;)
     Werner
-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
    
    
More information about the Pkg-sysvinit-devel
mailing list