NetBSD-Users archive

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

Re: bmake and interactive processes



In article <20151014004859.GD27214@phobos>,
Malcolm Herbert  <mjch%mjch.net@localhost> wrote:
>Hello all - I've been a long time user of bmake/pmake for various
>tasks and have recently started using my make recipes to initiate an
>interactive PostgreSQL shell with the same set of arguments that I'm
>using elsewhere and reduce some duplication in my code.
>
>I'm finding that if I use ctrl-c to exit pgsql (and therefore make as
>well) that my terminal appears to end up in a no-echo mode for some
>reason. I definitely have this problem when using bmake/pmake under
>Linux, I haven't confirmed whether this also is the case under NetBSD at
>this point (I will do so tonight).
>
>I am able to restore my terminal with 'reset' or 'stty sane' however
>when I add these to rules within my Makefile they appear to be triggered
>by make but by the time it finishes, the terminal is back to its broken
>state.
>
>I know make isn't designed to drive interactive commands, so this isn't
>a gripe about that per se, but I am curious to know what I can do about
>it. Does anyone have ideas? 
>
>So far I've added a trap to the shell script on exit to run 'reset'
>after the pgsql command exits, however as noted above, although my
>terminal clears, the problem persists.

bmake does not change the terminal modes but probably the psql shell
does and does not restore them on some signal. I'd file a bug report
with the Postgres people.

christos



Home | Main Index | Thread Index | Old Index