Path: utzoo!attcan!uunet!munnari!otc!metro!ipso!runx!brucee From: brucee@runx.ips.oz (Bruce Evans) Newsgroups: comp.os.minix Subject: Re: Problems with the read system call and vol.c Message-ID: <1753@runx.ips.oz> Date: 23 Sep 88 08:18:18 GMT References: <638@faui44.informatik.uni-erlangen.de> Reply-To: brucee@runx.OZ (Bruce Evans) Organization: RUNX Un*x Timeshare. Sydney, Australia. Lines: 21 Robert Regn writes >I have gotten a strange behavior of the read system call ruuning the command >tar c . - |vol 360 /dev/fd0 & >[...] >Printing the return value of 'read(tty, ... ' I get -1; >and using perror 'no such process' !!! >This error can't occur in read. It is a bug or misfeature. When two processes try to read the same terminal (the first one having been suspended), the second one fails. The error code is supposed to be private to FS but goes all the way back to the user process where it is misinterpreted. This _is_ a bug. Much the same problems affect writes to terminals. The right way to fix this is to handle suspensions more in FS than in the drivers, keeping _all_ the i/o parameters in fproc, and queueing up i/o to character devices using a chain pointer in fproc. Bruce Evans Internet: brucee@runx.ips.oz.au UUCP: uunet!runx.ips.oz.au!brucee