Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!NSS.CS.UCL.AC.UK!rde%topexpress.co.uk From: rde%topexpress.co.uk@NSS.CS.UCL.AC.UK (Richard Evans) Newsgroups: gnu.emacs.bug Subject: Problem in callproc.c Message-ID: <20725.8902151747@igor.topexp.co.uk> Date: 15 Feb 89 17:47:34 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19 GNU Emacs version 18.49, Sun-3 implementation --------------------------------------------- There is a minor problem in 'call-process' in callproc.c. If the BUFFER parameter is zero, /dev/null is opened as follows: if (XTYPE (buffer) == Lisp_Int) #ifdef VMS fd[1] = open ("NLA0:", 0), fd[0] = -1; #else fd[1] = open ("/dev/null", 0), fd[0] = -1; #endif /* not VMS */ ON the Sun (OS releases 3.5 and 4.0), zero flags means read only and the process will get an error if is tries to write to the descriptor. I noticed this because I got a 'bad file number' report in a mail message returned due to a bad address (ie. a sendmail error). Changing the zero to O_RDWR (or O_WRONLY, I guess) fixes this problem.