FYI, just finished that test, commenting out the two TIOCSCTTY force-steals in init code solves the issue.<div>I wonder what kind of init you normally use ? This is plain old sysvinit ...<br><div><br><div class="gmail_quote">
On Sun, Sep 26, 2010 at 11:29 PM, Jerome Martin <span dir="ltr"><<a href="mailto:tramjoe.merin@gmail.com">tramjoe.merin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
ok, will do.<div>But meanwhile I have checked sysvinit sources, and since the very first release this code is in, so I assumed you have a workaround for this, but I find it strange that it works, because not only init steal the tty when starting, but it does so in a separate process every time it spawns a child too....</div>
<div><br></div><div><div><span style="white-space:pre-wrap">                        </span>if ((f = console_open(O_RDWR|O_NOCTTY)) >= 0) {</div><div><span style="white-space:pre-wrap">                                </span>/* Take over controlling tty by force */</div>
<div><span style="white-space:pre-wrap">                                </span>(void)ioctl(f, TIOCSCTTY, 1);</div><div> <span style="white-space:pre-wrap">                                </span>dup(f);</div><div> <span style="white-space:pre-wrap">                                </span>dup(f);</div>
<div><span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                        </span>SETSIG(sa, SIGCHLD, SIG_DFL, SA_RESTART);</div><div><span style="white-space:pre-wrap">                        </span>if ((pid = fork()) < 0) {</div>
<div> <span style="white-space:pre-wrap">                                </span>initlog(L_VB, "cannot fork: %s",</div><div><span style="white-space:pre-wrap">                                        </span>strerror(errno));</div><div><span style="white-space:pre-wrap">                                </span>exit(1);</div>
<div><span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                        </span>if (pid > 0) {</div><div><span style="white-space:pre-wrap">                                </span>/*</div>
<div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>Ignore keyboard signals etc.</div><div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>Then wait for child to exit.</div>
<div><span style="white-space:pre-wrap">                                </span> */</div><div><span style="white-space:pre-wrap">                                </span>SETSIG(sa, SIGINT, SIG_IGN, SA_RESTART);</div><div><span style="white-space:pre-wrap">                                </span>SETSIG(sa, SIGTSTP, SIG_IGN, SA_RESTART);</div>
<div><span style="white-space:pre-wrap">                                </span>SETSIG(sa, SIGQUIT, SIG_IGN, SA_RESTART);</div><div><br></div><div><span style="white-space:pre-wrap">                                </span>while ((rc = waitpid(pid, &st, 0)) != pid)</div>
<div><span style="white-space:pre-wrap">                                        </span>if (rc < 0 && errno == ECHILD)</div><div><span style="white-space:pre-wrap">                                                </span>break;</div><div><br></div><div><span style="white-space:pre-wrap">                                </span>/*</div>
<div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>Small optimization. See if stealing</div><div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>controlling tty back is needed.</div>
<div><span style="white-space:pre-wrap">                                </span> */</div><div><span style="white-space:pre-wrap">                                </span>pgrp = tcgetpgrp(f);</div><div><span style="white-space:pre-wrap">                                </span>if (pgrp != getpid())</div>
<div><span style="white-space:pre-wrap">                                        </span>exit(0);</div><div><br></div><div><span style="white-space:pre-wrap">                                </span>/*</div><div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>Steal controlling tty away. We do</div>
<div><span style="white-space:pre-wrap">                                </span> *<span style="white-space:pre-wrap">        </span>this with a temporary process.</div><div><span style="white-space:pre-wrap">                                </span> */</div>
<div><span style="white-space:pre-wrap">                                </span>if ((pid = fork()) < 0) {</div><div> <span style="white-space:pre-wrap">                                        </span>initlog(L_VB, "cannot fork: %s",</div>
<div><span style="white-space:pre-wrap">                                                </span>strerror(errno));</div><div><span style="white-space:pre-wrap">                                        </span>exit(1);</div><div><span style="white-space:pre-wrap">                                </span>}</div>
<div><span style="white-space:pre-wrap">                                </span>if (pid == 0) {</div><div><span style="white-space:pre-wrap">                                        </span>setsid();</div><div><span style="white-space:pre-wrap">                                        </span>(void)ioctl(f, TIOCSCTTY, 1);</div>
<div><span style="white-space:pre-wrap">                                        </span>exit(0);</div><div><span style="white-space:pre-wrap">                                </span>}</div></div><div><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Sep 26, 2010 at 11:26 PM, Ray Strode <span dir="ltr"><<a href="mailto:halfline@gmail.com" target="_blank">halfline@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><br>
> Is the debug logged saved somewhere ? Because with my setup copying it from<br>
> the console is going to be tedious...<br>
</div>Yes, should be in /var/log/plymouth-debug.log<br>
<br>
alternatively you can just cat /dev/vcs1<br>
<font color="#888888"><br>
--Ray<br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Jérôme Martin<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Jérôme Martin<br>
</div></div>