From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Jones Subject: stty fails in babel sh blocks, workaround? Date: Wed, 08 Apr 2015 10:45:59 -0400 Message-ID: <87384aispk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfrF2-0007YK-Bw for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 10:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfrEx-0003Sy-9o for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 10:46:08 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:33817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfrEx-0003Sr-63 for emacs-orgmode@gnu.org; Wed, 08 Apr 2015 10:46:03 -0400 Received: by qcyk17 with SMTP id k17so30358098qcy.1 for ; Wed, 08 Apr 2015 07:46:02 -0700 (PDT) Received: from octo.gmail.com (c-71-63-10-199.hsd1.va.comcast.net. [71.63.10.199]) by mx.google.com with ESMTPSA id 144sm7610208qhx.45.2015.04.08.07.46.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 08 Apr 2015 07:46:01 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I'm running some programs that expect to be able to get terminal settings via (python fragment): ioctl(1, termios.TIOCGWINSZ, ' '*8))ioctl(1, termios.TIOCGWINSZ, ' '*8)) however, sh code run under babel appears not to have the terminal device that's expected: ----------------------------nostty.org---------------------------- * No stty in babel #+BEGIN_SRC sh :results output :exports both exec 2>&1; date; set -e; # set -x; stty || true #+END_SRC #+RESULTS: : Wed Apr 8 10:33:33 EDT 2015 : stty: standard input: Inappropriate ioctl for device ------------------------------------------------------------------ I realize this is probably inherent to the design/the way babel works, but are there any workaround (creating fake terminals, etc)? Thanks, ---George Jones