pkgsrc-Users archive

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

Re: www/serf tty misbehavior



Robert Elz <kre%munnari.OZ.AU@localhost> writes:

>     Date:        Thu, 12 Dec 2013 18:05:00 +0400
>     From:        Aleksej Saushev <asau%inbox.ru@localhost>
>     Message-ID:  <8738ly5fn7.fsf%inbox.ru@localhost>
>
>   | Shouldn't that be "make >& OUT"?
>
> No .. or that is it could be, but that's a hack for cshcompatability,
> and not recommended, the >&file syntax is ambiguoys with the >&N syntax
> for rearranging file descriptors, so bash uses &> for the csdh'ism >&
> (of course, ">FILE 2>&1" works too, and works in all sh's so I just use that.

Bash uses "&>" as a shortcut, but I ran with the POSIX-specified
  make > /dev/null 2>&1 &
and got the hang.  ps alxw says that scons is at fault.

> Greg, run the make again (no need to clean), in foreground, and see
> what happens.

There is a need to clean; pkgsrc make won't actually run the build
target if work/.build_done is present.   (I actually tried this.)

If I redirect stdin as well, the problem does not occur:

  make < /dev/null > /dev/null 2>&1 &

so the problem is that scons does something to stdin.

After about 20 print statements, I present the following minimal test
program, which blocks if run in the background but runs fine in the
foreground.  (scons hangs where it does "import readline".)

So this is either a readline bug, or a bug in scons for invoking
readline when the input should not be read.


#!/usr/pkg/bin/python2.7

import sys

sys.stderr.write("before readline\n")
import readline
sys.stderr.write("after readline\n")

Attachment: pgpC93iIsVShH.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index