[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls -l --no-total
From: |
P |
Subject: |
Re: ls -l --no-total |
Date: |
Mon, 28 Feb 2005 13:38:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
address@hidden wrote:
The POSIX specification requires that the prompt be issued to stderr:-
Fair enough. Thanks for the info.
What my patch essentially did was:
if (isatty(stderr)) { /* interactive */
human=open("/dev/tty");
fcntl(human,F_SETFD,FD_CLOEXEC);
} else {
human=stderr;
}
/* subsequent prompts written to human rather than stderr */
Note bash does special interactive handling anyway.
For example $PS1 is only set for interactive shells.
--
Pádraig Brady - http://www.pixelbeat.org
--