On 2012-06-09 01:51 +0200, Thomas Dickey wrote:

> On Fri, Jun 08, 2012 at 09:58:00PM +0200, Sven Joachim wrote:
>> Do you also redirect stdin?  Otherwise it's hard to get a non-zero
>
> no - just stdout/stderr
>
> On the other hand, rpm and dpkg build tools can redirect things as well.

Indeed, and sbuild does just that:

,----
| sbuild (0.37) unstable; urgency=low
| 
|       + Disassociate from the controlling terminal and make stdin /dev/null
|         for the dpkg-buildpackage process.
| 
|  -- Roger Leigh <rle...@debian.org>  Tue, 31 Jan 2006 12:58:57 +0000
`----

Pbuilder redirects stdin to a pipe, also failing the test.

>> result from poll(): you have to manage pressing the return key during
>> the 100 milliseconds the test takes, it seems.
>
> The exit code is inverted: it is true if nonzero, which could be
> -1 or some number greater than zero (the latter would indicate some
> input happening, though which of the cases is hard to tell).

Aah, of course.  Now this makes sense even to me.

> I've modified the test to fix the two issues that I could see,
> and made rpm/dpkg scripts which did fail, but now work with the
> changed test.

Thanks,
       Sven



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to