Weird, I found some refs to TIOCSCTTY-based tty stealing, and it seems that at least at some point in the past, this does not trigger a clean hangup on the previous controlled session side. Is this still the case or do you have any means of detecting the situation ? Can I force plymouth splash to use any tty I want it to, or am I locked into tty1 ?<br>
<br><div class="gmail_quote">On Sun, Sep 26, 2010 at 11:35 PM, Jerome Martin <span dir="ltr">&lt;<a href="mailto:tramjoe.merin@gmail.com">tramjoe.merin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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><div><div></div><div class="h5">
<br><div class="gmail_quote">
On Sun, Sep 26, 2010 at 11:29 PM, Jerome Martin <span dir="ltr">&lt;<a href="mailto:tramjoe.merin@gmail.com" target="_blank">tramjoe.merin@gmail.com</a>&gt;</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)) &gt;= 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()) &lt; 0) {</div>


<div>  <span style="white-space:pre-wrap">                                </span>initlog(L_VB, &quot;cannot fork: %s&quot;,</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 &gt; 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, &amp;st, 0)) != pid)</div>
<div><span style="white-space:pre-wrap">                                        </span>if (rc &lt; 0 &amp;&amp; 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()) &lt; 0) {</div><div>  <span style="white-space:pre-wrap">                                        </span>initlog(L_VB, &quot;cannot fork: %s&quot;,</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><br><br><div class="gmail_quote">On Sun, Sep 26, 2010 at 11:26 PM, Ray Strode <span dir="ltr">&lt;<a href="mailto:halfline@gmail.com" target="_blank">halfline@gmail.com</a>&gt;</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>
&gt; Is the debug logged saved somewhere ? Because with my setup copying it from<br>
&gt; 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></div></div>-- <br>Jérôme Martin<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Jérôme Martin<br>