* select.cc (peek_pipe): Only grab mutex when we actually got something from

the pipe.
This commit is contained in:
Christopher Faylor
2001-09-24 22:49:12 +00:00
parent 35f879a6d0
commit 3263838430
4 changed files with 19 additions and 9 deletions

View File

@ -77,7 +77,12 @@ extern char __declspec(dllimport) *__progname;
#define IGNORE_FIRST (*options == '-' || *options == '+')
#define PRINT_ERROR ((opterr) && ((*options != ':') \
|| (IGNORE_FIRST && options[1] != ':')))
#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
#if defined(__CYGWIN__) || defined(__MINGW32__)
# define IS_POSIXLY_CORRECT (1)
#else
# define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
#endif
#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
/* XXX: GNU ignores PC if *options == '-' */
#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-')