Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!im4u!milano!mcc-pp!tiemann From: tiemann@mcc-pp.UUCP (Michael Tiemann) Newsgroups: net.emacs Subject: Inferior process violates gnuemacs 1st ammendment? Message-ID: <1508@mcc-pp.UUCP> Date: Wed, 13-Aug-86 20:57:51 EDT Article-I.D.: mcc-pp.1508 Posted: Wed Aug 13 20:57:51 1986 Date-Received: Thu, 14-Aug-86 08:23:34 EDT Organization: MCC, Austin, TX Lines: 54 Keywords: hot-shots, pipes, send-region, @$**&! So we *know* we're talking the same language, here's some simple gnuemacs lisp code: (defun setup-process (a &rest b) (interactive) (setq cat (eval (cons 'start-process (append (list a a a) b)))) ) (defun send-process-region () (interactive) (send-region cat (point) (mark)) ) (defun cat () (interactive) (setup-process "cat") (switch-to-buffer "cat") ) (defun x-cat () (interactive) (kill-buffer "cat") ) (global-set-key "\e$" 'send-process-region) Here's the problem: we set up at "cat" process (copy input to output), find a big file, set point and mark to be 1000 characters apart, and they repeatedly type "ESC-$" . On our SUN-3 about the 4th "ESC-4" the error message "writing to process: operation would block, cat" pops up. If we continue to type "ESC-$", the error sometimes comes up, and sometimes does not. On our VAX 11/750 "running" (walking) BDS 4.2, there is no error message, but the gnuemacs shows up as Idle in ps -ux. (A few ^G's wake it into abortion-land). Clues? Look in process.c for the error-causing routine (send_process_1). The problem gets worse: if I want to send a 10k region, not even one call will go through. The code looks easy, so either (1) I understand nothing about pipes. (2) The authors of GNU understand nothing about pipes (3) Our friends at Berkely understands nothing about pipes. And its not "cat"'s fault: I wrote a program that just says "hello" and then proceedes to read (and only read) the keyboard. Same result. It seems to me that if I want to write a zillion bytes to a pipe, and somebody else wants to read it, that the OS should wake and sleep us until those zillion bytes have zipped through the pipe. If this is an incorrect interpretation, please tell me how to pretend this is happening. Michael "God I wish I had shared memory" Tiemann