https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-05-07T03:33:02ZRuby Issue Tracking SystemRuby master - Bug #13546: std steams are closed in Windows app.https://bugs.ruby-lang.org/issues/13546?journal_id=646792017-05-07T03:33:02Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/64679/diff?detail_id=44980">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Do you call <code>ruby_sysinit</code>?</p> Ruby master - Bug #13546: std steams are closed in Windows app.https://bugs.ruby-lang.org/issues/13546?journal_id=647572017-05-12T00:36:00Zalex (Alex Epifanov)
<ul></ul><p>nobu (Nobuyoshi Nakada) wrote:</p>
<blockquote>
<p>Do you call <code>ruby_sysinit</code>?</p>
</blockquote>
<p>Our initialization code looks like this:</p>
<pre><code class="c syntaxhl" data-language="c"> <span class="n">RUBY_INIT_STACK</span><span class="p">;</span>
<span class="n">ruby_init</span><span class="p">();</span>
<span class="cp">#if defined(WIN32)
</span> <span class="n">rb_w32_sysinit</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="nb">NULL</span><span class="p">);</span>
<span class="cp">#endif
</span></code></pre> Ruby master - Bug #13546: std steams are closed in Windows app.https://bugs.ruby-lang.org/issues/13546?journal_id=647732017-05-12T07:33:08Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Rejected</i></li></ul><p>Where do you define <code>WIN32</code>?<br>
Note that the predefined macro is <code>_WIN32</code>.<br>
And the call to <code>rb_w32_sysinit</code> must be <strong>before</strong> <code>ruby_init</code>, and the arguments must <strong>not</strong> be <code>NULL</code>.</p>