/****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 2020-2021,2024 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
char *ttyname(int fd);
#endif
-MODULE_ID("$Id: tset.c,v 1.131 2021/12/04 23:02:13 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.132 2024/03/17 00:15:54 tom Exp $")
#ifndef environ
extern char **environ;
if (!noinit) {
if (send_init_strings(my_fd, &oldmode)) {
+ const char *name;
+
(void) putc('\r', stderr);
(void) fflush(stderr);
- (void) napms(1000); /* Settle the terminal. */
+ if (isatty(my_fd)
+ && (name = ttyname(my_fd)) != NULL
+ && strncmp(name, "/dev/pts/", 9)) {
+ (void) napms(1000); /* Settle the terminal. */
+ }
}
}