[Pkg-sysvinit-devel] Bug#537182: leftover startpar process after makefile concurrency boot

Petter Reinholdtsen pere at hungry.com
Wed Jul 15 22:06:35 UTC 2009


I build a startpar version with debug symbols and tested using this
one.  I got this backtrace:

#0  0xb8086424 in __kernel_vsyscall ()
#1  0xb7ff3e53 in read () from /lib/i686/cmov/libc.so.6
#2  0x08049ace in do_forward () at startpar.c:463
#3  0x0804a961 in main (argc=4, argv=0xbfccef44) at startpar.c:669

This is the hanging code:

void do_forward(void)
{
  char buf[4096], *b;
  int r, rr;
  setsid();
  while ((r = read(0, buf, sizeof(buf))) > 0)
    {
      b = buf;
      while (r > 0)
        {
          rr = write(1, b, r);
          if (rr == -1)
            {
              perror("write");
              rr = r;
            }
          r -= rr;
        }
    }
  _exit(0);
}

Not quite sure why file descriptor 0 points to /dev/ptmx at that
point.

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list