Bug#584102: startpar: Fail if fd 0 is strange tty

2010-06-07 Thread Petter Reinholdtsen
[Dr. Werner Fink]
> Hmmm ... stderr maybe, something like

I do not know, but suspect stderr is a pipe too.  Is a tty required to
run scripts in parallel?  Lets keep this discussion CCed to the BTS
(584...@bugs.debian.org).

> Btw: I've lost your mail

Bounced it to you.

> 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 ;)

upstart is getting support for handling init.d scripts natively, so
that will be an alternative too.

Would be nice to get startpar to start rcS.d/ and rc2.d/ at once, to
maximize concurrency, as Debian uses init.d scripts also for the early
boot.  Also, would be nice to get dynamic resolution of $remote_fs, to
let it be equal to $local_fs if no networked file systems are listed
in /etc/fstab. :) Not sure how hard that would be.  Lets continue this
part of the discussion without CC-ing the BTS.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#584102: startpar: Fail if fd 0 is strange tty

2010-06-07 Thread Dr. Werner Fink
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



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#584102: startpar: Fail if fd 0 is strange tty

2010-06-07 Thread Petter Reinholdtsen
[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?

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org