NetBSD-Users archive

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

Re: ast-ksh on NetBSD 6.0



In article <20121108080251.GC2261%mail.duskware.de@localhost>,
Martin Husemann  <martin%duskware.de@localhost> wrote:
>I will have a look (time for more atf tests I guess).
>Christos: do you have any special hint what is going on already?

Yes, although posix_spawn() sets the process group, there is nothing
setting the tty foreground process group so when the process tries to
output fails?

You can run this in a job control aware shell, and also ast-ksh and
you'll see what I mean. I don't think that posix_spawn() is supposed
to do the tty process group mangling, but if it does not, isn't there
a race, since if it is done by the parent the child may have had a chance
to run?

christos


#include <stdio.h>
#include <unistd.h>

int
main(int argc, char *argv[])
{
        for (;;) {
                fprintf(stdout, "%d %d %d\n",
                    getpid(), getpgid(0), tcgetpgrp(0));
                sleep(1);
        }
        return 0;
}





Home | Main Index | Thread Index | Old Index