2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright (c) 1993 Michael Haardt
|
|
|
|
.\" (michael@moria.de)
|
|
|
|
.\" Fri Apr 2 11:32:09 MET DST 1993
|
|
|
|
.\"
|
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioperm.2, ipc.2, listxattr.2, mlock.2, modify_ldt.2, mremap.2, nanosleep.2, outb.2, perf_event_open.2, ptrace.2, removexattr.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, setsid.2, setxattr.2, socketcall.2, unimplemented.2, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, cfree.3, crypt.3, dlopen.3, encrypt.3, errno.3, fenv.3, ftime.3, ftw.3, getgrent_r.3, getpass.3, getpwent_r.3, getutent.3, hsearch.3, lio_listio.3, lockf.3, login.3, longjmp.3, perror.3, printf.3, scandirat.3, setjmp.3, strfmon.3, strtoimax.3, termios.3, ttyname.3, ualarm.3, updwtmp.3, wcstoimax.3, wordexp.3, console_ioctl.4, dsp56k.4, fd.4, hd.4, intro.4, lp.4, mem.4, null.4, ram.4, rtc.4, sk98lin.4, tty.4, ttyS.4, vcs.4, filesystems.5, group.5, host.conf.5, hosts.5, intro.5, issue.5, motd.5, networks.5, nologin.5, nsswitch.conf.5, passwd.5, proc.5, protocols.5, securetty.5, shells.5, termcap.5, ttytype.5, utmp.5, intro.6, armscii-8.7, ascii.7, bootparam.7, cp1251.7, environ.7, glob.7, intro.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, posixoptions.7, standards.7, unicode.7, utf-8.7, intro.8: s/GPLv2+_doc_full/GPLv2+_DOC_FULL/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:46 +00:00
|
|
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public
|
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioperm.2, ipc.2, listxattr.2, mlock.2, modify_ldt.2, mremap.2, nanosleep.2, outb.2, ptrace.2, removexattr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, setsid.2, setxattr.2, socketcall.2, unimplemented.2, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, cfree.3, crypt.3, dlopen.3, errno.3, fenv.3, ftime.3, ftw.3, getgrent_r.3, getpass.3, getpwent_r.3, getutent.3, hsearch.3, lio_listio.3, login.3, longjmp.3, perror.3, printf.3, scandirat.3, setjmp.3, strfmon.3, strtoimax.3, termios.3, ttyname.3, ualarm.3, wcstoimax.3, wordexp.3, console_ioctl.4, dsp56k.4, fd.4, hd.4, intro.4, lp.4, mem.4, null.4, ram.4, rtc.4, sk98lin.4, tty.4, ttyS.4, vcs.4, charmap.5, filesystems.5, ftpusers.5, gai.conf.5, group.5, host.conf.5, hosts.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, nss.5, nsswitch.conf.5, passwd.5, proc.5, protocols.5, securetty.5, shells.5, termcap.5, ttytype.5, utmp.5, intro.6, armscii-8.7, ascii.7, bootparam.7, cp1251.7, cpuset.7, environ.7, glob.7, intro.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, posixoptions.7, standards.7, unicode.7, utf-8.7, intro.8, ldconfig.8, nscd.8: Global fix: Update info in source comments on where to get a copy of the GPL
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:43 +00:00
|
|
|
.\" License along with this manual; if not, see
|
|
|
|
.\" <http://www.gnu.org/licenses/>.
|
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioperm.2, ipc.2, listxattr.2, mlock.2, modify_ldt.2, mremap.2, nanosleep.2, outb.2, perf_event_open.2, ptrace.2, removexattr.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, setsid.2, setxattr.2, socketcall.2, unimplemented.2, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, cfree.3, crypt.3, dlopen.3, encrypt.3, errno.3, fenv.3, ftime.3, ftw.3, getgrent_r.3, getpass.3, getpwent_r.3, getutent.3, hsearch.3, lio_listio.3, lockf.3, login.3, longjmp.3, perror.3, printf.3, scandirat.3, setjmp.3, strfmon.3, strtoimax.3, termios.3, ttyname.3, ualarm.3, updwtmp.3, wcstoimax.3, wordexp.3, console_ioctl.4, dsp56k.4, fd.4, hd.4, intro.4, lp.4, mem.4, null.4, ram.4, rtc.4, sk98lin.4, tty.4, ttyS.4, vcs.4, filesystems.5, group.5, host.conf.5, hosts.5, intro.5, issue.5, motd.5, networks.5, nologin.5, nsswitch.conf.5, passwd.5, proc.5, protocols.5, securetty.5, shells.5, termcap.5, ttytype.5, utmp.5, intro.6, armscii-8.7, ascii.7, bootparam.7, cp1251.7, environ.7, glob.7, intro.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, posixoptions.7, standards.7, unicode.7, utf-8.7, intro.8: Global fix: Add LICENSE_START(GPLv2+_doc_full)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:44 +00:00
|
|
|
.\" %%%LICENSE_END
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
|
|
|
.\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
|
|
|
|
.\" Modified 1995-02-25 by Jim Van Zandt <jrv@vanzandt.mv.com>
|
|
|
|
.\" Modified 1995-09-02 by Jim Van Zandt <jrv@vanzandt.mv.com>
|
|
|
|
.\" moved to man3, aeb, 950919
|
2007-09-20 06:52:22 +00:00
|
|
|
.\" Modified 2001-09-22 by Michael Kerrisk <mtk.manpages@gmail.com>
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Modified 2001-12-17, aeb
|
|
|
|
.\" Modified 2004-10-31, aeb
|
2006-12-28 09:16:52 +00:00
|
|
|
.\" 2006-12-28, mtk:
|
|
|
|
.\" Added .SS headers to give some structure to this page; and a
|
|
|
|
.\" small amount of reordering.
|
2010-01-16 16:54:51 +00:00
|
|
|
.\" Added a section on canonical and noncanonical mode.
|
2006-12-28 09:16:52 +00:00
|
|
|
.\" Enhanced the discussion of "raw" mode for cfmakeraw().
|
|
|
|
.\" Document CMSPAR.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
locale.1, localedef.1, _exit.2, accept.2, access.2, acct.2, adjtimex.2, bdflush.2, bind.2, bpf.2, brk.2, chdir.2, chmod.2, chown.2, chroot.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_ctl.2, eventfd.2, execve.2, fallocate.2, fanotify_init.2, fcntl.2, flock.2, fork.2, fsync.2, futex.2, get_kernel_syms.2, getdomainname.2, getgroups.2, gethostname.2, getpagesize.2, getpeername.2, getsid.2, getsockname.2, getsockopt.2, gettimeofday.2, init_module.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, kexec_load.2, kill.2, killpg.2, link.2, listen.2, llseek.2, lseek.2, madvise.2, memfd_create.2, mincore.2, mkdir.2, mknod.2, mmap.2, mount.2, nanosleep.2, nice.2, open.2, personality.2, pipe.2, poll.2, posix_fadvise.2, read.2, readahead.2, readlink.2, readv.2, recv.2, recvmmsg.2, rename.2, request_key.2, sched_setaffinity.2, sched_setattr.2, select.2, select_tut.2, semctl.2, semop.2, send.2, sendfile.2, sendmmsg.2, seteuid.2, setns.2, setpgid.2, setreuid.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigsuspend.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, symlink.2, sync.2, syscall.2, syscalls.2, times.2, truncate.2, unlink.2, unshare.2, uselib.2, utimensat.2, vfork.2, vhangup.2, wait.2, wait4.2, write.2, a64l.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_read.3, aio_write.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3, atoi.3, backtrace.3, cbrt.3, ceil.3, cfree.3, clearenv.3, clock_getcpuclockid.3, clog10.3, cmsg.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, daemon.3, dirfd.3, div.3, dl_iterate_phdr.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, endian.3, erf.3, erfc.3, errno.3, exec.3, exp.3, exp2.3, expm1.3, fabs.3, fdim.3, ferror.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, fopen.3, fpclassify.3, frexp.3, fseeko.3, fts.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getline.3, getloadavg.3, getmntent.3, getnameinfo.3, getnetent_r.3, getpass.3, getprotoent_r.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent_r.3, getservent_r.3, getspnam.3, getsubopt.3, getusershell.3, getutent.3, getw.3, gsignal.3, hypot.3, ilogb.3, inet.3, initgroups.3, insque.3, isalpha.3, isgreater.3, iswblank.3, j0.3, ldexp.3, lgamma.3, lio_listio.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, makedev.3, matherr.3, mbsnrtowcs.3, mkdtemp.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_receive.3, mq_send.3, nan.3, nextafter.3, on_exit.3, open_memstream.3, opendir.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, pow.3, printf.3, profil.3, psignal.3, pthread_attr_setstack.3, pthread_setaffinity_np.3, putenv.3, putpwent.3, qecvt.3, rand.3, random.3, random_r.3, rcmd.3, readdir.3, realpath.3, remainder.3, remquo.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, scalb.3, scalbln.3, scandir.3, scanf.3, seekdir.3, sem_wait.3, setbuf.3, setenv.3, setjmp.3, setnetgrent.3, siginterrupt.3, signbit.3, significand.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stpcpy.3, stpncpy.3, strdup.3, strerror.3, strftime.3, strlen.3, strnlen.3, strsep.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, syslog.3, system.3, tan.3, tanh.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, trunc.3, ttyslot.3, tzset.3, ualarm.3, unlocked_stdio.3, usleep.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3, wprintf.3, y0.3, pts.4, st.4, tty_ioctl.4, elf.5, gai.conf.5, group.5, locale.5, nsswitch.conf.5, proc.5, utmp.5, aio.7, capabilities.7, credentials.7, environ.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, mq_overview.7, namespaces.7, pipe.7, signal.7, socket.7, standards.7, svipc.7, symlink.7, time.7, unicode.7, unix.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-15 03:46:01 +00:00
|
|
|
.TH TERMIOS 3 2016-03-15 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
|
|
|
|
cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
|
|
|
|
get and set terminal attributes, line control, get and set baud rate
|
|
|
|
.SH SYNOPSIS
|
2007-06-15 21:51:26 +00:00
|
|
|
.nf
|
2007-06-23 07:05:05 +00:00
|
|
|
.B #include <termios.h>
|
2004-11-03 13:51:07 +00:00
|
|
|
.br
|
2007-06-23 07:05:05 +00:00
|
|
|
.B #include <unistd.h>
|
2004-11-03 13:51:07 +00:00
|
|
|
.sp
|
|
|
|
.BI "int tcgetattr(int " fd ", struct termios *" termios_p );
|
|
|
|
.sp
|
2007-06-15 21:51:26 +00:00
|
|
|
.BI "int tcsetattr(int " fd ", int " optional_actions ,
|
|
|
|
.BI " const struct termios *" termios_p );
|
2004-11-03 13:51:07 +00:00
|
|
|
.sp
|
|
|
|
.BI "int tcsendbreak(int " fd ", int " duration );
|
|
|
|
.sp
|
|
|
|
.BI "int tcdrain(int " fd );
|
|
|
|
.sp
|
|
|
|
.BI "int tcflush(int " fd ", int " queue_selector );
|
|
|
|
.sp
|
|
|
|
.BI "int tcflow(int " fd ", int " action );
|
|
|
|
.sp
|
|
|
|
.BI "void cfmakeraw(struct termios *" termios_p );
|
|
|
|
.sp
|
|
|
|
.BI "speed_t cfgetispeed(const struct termios *" termios_p );
|
|
|
|
.sp
|
|
|
|
.BI "speed_t cfgetospeed(const struct termios *" termios_p );
|
|
|
|
.sp
|
|
|
|
.BI "int cfsetispeed(struct termios *" termios_p ", speed_t " speed );
|
|
|
|
.sp
|
|
|
|
.BI "int cfsetospeed(struct termios *" termios_p ", speed_t " speed );
|
2007-11-19 18:45:15 +00:00
|
|
|
.sp
|
2007-12-17 09:43:42 +00:00
|
|
|
.BI "int cfsetspeed(struct termios *" termios_p ", speed_t " speed );
|
2007-06-15 21:51:26 +00:00
|
|
|
.fi
|
2007-07-08 12:11:40 +00:00
|
|
|
.sp
|
|
|
|
.in -4n
|
|
|
|
Feature Test Macro Requirements for glibc (see
|
|
|
|
.BR feature_test_macros (7)):
|
|
|
|
.in
|
|
|
|
.sp
|
|
|
|
.BR cfsetspeed (),
|
|
|
|
.BR cfmakeraw ():
|
getgroups.2, gettimeofday.2, mincore.2, readv.2, stime.2, wait4.2, addseverity.3, adjtime.3, cfree.3, dysize.3, fgetgrent.3, fgetpwent.3, futimes.3, getdirentries.3, getgrent_r.3, getgrouplist.3, getmntent.3, getnetent_r.3, getprotoent_r.3, getpwent_r.3, getrpcent_r.3, getservent_r.3, getspnam.3, gsignal.3, initgroups.3, mkdtemp.3, on_exit.3, perror.3, psignal.3, putpwent.3, rcmd.3, rpmatch.3, setbuf.3, setnetgrent.3, sigvec.3, strsep.3, syslog.3, tempnam.3, termios.3, timegm.3, timeradd.3: Update FTM requirements (_DEFAULT_SOURCE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-09 11:52:57 +00:00
|
|
|
Since glibc 2.19:
|
|
|
|
_DEFAULT_SOURCE
|
|
|
|
Glibc 2.19 and earlier:
|
|
|
|
_BSD_SOURCE
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The termios functions describe a general terminal interface that is
|
|
|
|
provided to control asynchronous communications ports.
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS The termios structure
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
|
|
|
Many of the functions described here have a \fItermios_p\fP argument
|
2007-04-12 22:42:49 +00:00
|
|
|
that is a pointer to a \fItermios\fP structure.
|
|
|
|
This structure contains at least the following members:
|
2004-11-03 13:51:07 +00:00
|
|
|
.sp
|
2007-12-19 07:19:23 +00:00
|
|
|
.in +4n
|
2004-11-03 13:51:07 +00:00
|
|
|
.nf
|
2007-12-22 22:10:40 +00:00
|
|
|
tcflag_t c_iflag; /* input modes */
|
|
|
|
tcflag_t c_oflag; /* output modes */
|
|
|
|
tcflag_t c_cflag; /* control modes */
|
|
|
|
tcflag_t c_lflag; /* local modes */
|
2011-09-09 13:11:29 +00:00
|
|
|
cc_t c_cc[NCCS]; /* special characters */
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
2007-12-19 07:19:23 +00:00
|
|
|
.in
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2006-04-15 00:39:29 +00:00
|
|
|
The values that may be assigned to these fields are described below.
|
2007-04-12 22:42:49 +00:00
|
|
|
In the case of the first four bit-mask fields,
|
|
|
|
the definitions of some of the associated flags that may be set are
|
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
|
|
|
exposed only if a specific feature test macro (see
|
2006-05-15 09:13:10 +00:00
|
|
|
.BR feature_test_macros (7))
|
2006-04-15 00:39:29 +00:00
|
|
|
is defined, as noted in brackets ("[]").
|
|
|
|
.PP
|
2006-05-08 21:37:17 +00:00
|
|
|
In the descriptions below, "not in POSIX" means that the
|
2007-04-12 22:42:49 +00:00
|
|
|
value is not specified in POSIX.1-2001,
|
|
|
|
and "XSI" means that the value is specified in POSIX.1-2001
|
2006-05-08 21:37:17 +00:00
|
|
|
as part of the XSI extension.
|
|
|
|
.PP
|
2004-11-03 13:51:07 +00:00
|
|
|
\fIc_iflag\fP flag constants:
|
|
|
|
.TP
|
|
|
|
.B IGNBRK
|
|
|
|
Ignore BREAK condition on input.
|
|
|
|
.TP
|
|
|
|
.B BRKINT
|
2007-04-12 22:42:49 +00:00
|
|
|
If \fBIGNBRK\fP is set, a BREAK is ignored.
|
|
|
|
If it is not set
|
2004-11-03 13:51:07 +00:00
|
|
|
but \fBBRKINT\fP is set, then a BREAK causes the input and output
|
|
|
|
queues to be flushed, and if the terminal is the controlling
|
|
|
|
terminal of a foreground process group, it will cause a
|
|
|
|
\fBSIGINT\fP to be sent to this foreground process group.
|
|
|
|
When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
|
2008-06-09 15:49:35 +00:00
|
|
|
reads as a null byte (\(aq\\0\(aq), except when \fBPARMRK\fP is set,
|
2004-11-03 13:51:07 +00:00
|
|
|
in which case it reads as the sequence \\377 \\0 \\0.
|
|
|
|
.TP
|
|
|
|
.B IGNPAR
|
|
|
|
Ignore framing errors and parity errors.
|
|
|
|
.TP
|
|
|
|
.B PARMRK
|
2015-11-05 21:38:24 +00:00
|
|
|
If this bit is set, input bytes with parity or framing errors are
|
2015-12-02 19:17:30 +00:00
|
|
|
marked when passed to the program.
|
|
|
|
This bit is meaningful only when
|
2015-11-05 21:38:24 +00:00
|
|
|
\fBINPCK\fP is set and \fBIGNPAR\fP is not set.
|
|
|
|
The way erroneous bytes are marked is with two preceding bytes,
|
2015-12-02 19:17:30 +00:00
|
|
|
\\377 and \\0.
|
|
|
|
Thus, the program actually reads three bytes for one
|
2015-11-05 21:38:24 +00:00
|
|
|
erroneous byte received from the terminal.
|
2015-12-02 19:17:30 +00:00
|
|
|
If a valid byte has the value \\377,
|
|
|
|
and \fBISTRIP\fP (see below) is not set,
|
|
|
|
the program might confuse it with the prefix that marks a
|
|
|
|
parity error.
|
|
|
|
Therefore, a valid byte \\377 is passed to the program as two
|
2015-11-05 21:38:24 +00:00
|
|
|
bytes, \\377 \\377, in this case.
|
|
|
|
|
2007-04-12 22:42:49 +00:00
|
|
|
If neither \fBIGNPAR\fP nor \fBPARMRK\fP
|
2004-11-03 13:51:07 +00:00
|
|
|
is set, read a character with a parity error or framing error
|
|
|
|
as \\0.
|
|
|
|
.TP
|
|
|
|
.B INPCK
|
|
|
|
Enable input parity checking.
|
|
|
|
.TP
|
|
|
|
.B ISTRIP
|
|
|
|
Strip off eighth bit.
|
|
|
|
.TP
|
|
|
|
.B INLCR
|
|
|
|
Translate NL to CR on input.
|
|
|
|
.TP
|
|
|
|
.B IGNCR
|
|
|
|
Ignore carriage return on input.
|
|
|
|
.TP
|
|
|
|
.B ICRNL
|
|
|
|
Translate carriage return to newline on input (unless \fBIGNCR\fP is set).
|
|
|
|
.TP
|
|
|
|
.B IUCLC
|
|
|
|
(not in POSIX) Map uppercase characters to lowercase on input.
|
|
|
|
.TP
|
|
|
|
.B IXON
|
|
|
|
Enable XON/XOFF flow control on output.
|
|
|
|
.TP
|
|
|
|
.B IXANY
|
2007-04-12 22:42:49 +00:00
|
|
|
(XSI) Typing any character will restart stopped output.
|
2006-05-08 21:37:17 +00:00
|
|
|
(The default is to allow just the START character to restart output.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B IXOFF
|
|
|
|
Enable XON/XOFF flow control on input.
|
|
|
|
.TP
|
|
|
|
.B IMAXBEL
|
|
|
|
(not in POSIX) Ring bell when input queue is full.
|
|
|
|
Linux does not implement this bit, and acts as if it is always set.
|
2006-09-25 07:27:38 +00:00
|
|
|
.TP
|
|
|
|
.BR IUTF8 " (since Linux 2.6.4)"
|
2007-04-12 22:42:49 +00:00
|
|
|
(not in POSIX) Input is UTF8;
|
2006-09-25 07:27:38 +00:00
|
|
|
this allows character-erase to be correctly performed in cooked mode.
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2014-05-07 18:28:38 +00:00
|
|
|
.I c_oflag
|
|
|
|
flag constants:
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B OPOST
|
|
|
|
Enable implementation-defined output processing.
|
|
|
|
.TP
|
|
|
|
.B OLCUC
|
|
|
|
(not in POSIX) Map lowercase characters to uppercase on output.
|
|
|
|
.TP
|
|
|
|
.B ONLCR
|
|
|
|
(XSI) Map NL to CR-NL on output.
|
|
|
|
.TP
|
|
|
|
.B OCRNL
|
|
|
|
Map CR to NL on output.
|
|
|
|
.TP
|
|
|
|
.B ONOCR
|
|
|
|
Don't output CR at column 0.
|
|
|
|
.TP
|
|
|
|
.B ONLRET
|
|
|
|
Don't output CR.
|
|
|
|
.TP
|
|
|
|
.B OFILL
|
|
|
|
Send fill characters for a delay, rather than using a timed delay.
|
|
|
|
.TP
|
|
|
|
.B OFDEL
|
2014-05-07 18:52:20 +00:00
|
|
|
Fill character is ASCII DEL (0177).
|
2008-06-09 15:49:35 +00:00
|
|
|
If unset, fill character is ASCII NUL (\(aq\\0\(aq).
|
2006-05-08 21:37:17 +00:00
|
|
|
(Not implemented on Linux.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B NLDLY
|
2007-04-12 22:42:49 +00:00
|
|
|
Newline delay mask.
|
|
|
|
Values are \fBNL0\fP and \fBNL1\fP.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B CRDLY
|
|
|
|
Carriage return delay mask.
|
|
|
|
Values are \fBCR0\fP, \fBCR1\fP, \fBCR2\fP, or \fBCR3\fP.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B TABDLY
|
|
|
|
Horizontal tab delay mask.
|
|
|
|
Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (or \fBXTABS\fP).
|
|
|
|
A value of TAB3, that is, XTABS, expands tabs to spaces
|
|
|
|
(with tab stops every eight columns).
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B BSDLY
|
2007-04-12 22:42:49 +00:00
|
|
|
Backspace delay mask.
|
|
|
|
Values are \fBBS0\fP or \fBBS1\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
(Has never been implemented.)
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VTDLY
|
2007-04-12 22:42:49 +00:00
|
|
|
Vertical tab delay mask.
|
|
|
|
Values are \fBVT0\fP or \fBVT1\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B FFDLY
|
2007-04-12 22:42:49 +00:00
|
|
|
Form feed delay mask.
|
|
|
|
Values are \fBFF0\fP or \fBFF1\fP.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
|
|
|
\fIc_cflag\fP flag constants:
|
|
|
|
.TP
|
|
|
|
.B CBAUD
|
|
|
|
(not in POSIX) Baud speed mask (4+1 bits).
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B CBAUDEX
|
2007-06-22 20:40:07 +00:00
|
|
|
(not in POSIX) Extra baud speed mask (1 bit), included in
|
|
|
|
.BR CBAUD .
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2006-05-08 21:37:17 +00:00
|
|
|
.sp
|
2007-04-12 22:42:49 +00:00
|
|
|
(POSIX says that the baud speed is stored in the
|
|
|
|
.I termios
|
2006-05-08 21:37:17 +00:00
|
|
|
structure without specifying where precisely, and provides
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfgetispeed ()
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfsetispeed ()
|
2007-04-12 22:42:49 +00:00
|
|
|
for getting at it.
|
2007-06-22 20:40:07 +00:00
|
|
|
Some systems use bits selected by
|
|
|
|
.B CBAUD
|
|
|
|
in
|
2004-11-03 13:51:07 +00:00
|
|
|
.IR c_cflag ,
|
2007-06-08 11:56:22 +00:00
|
|
|
other systems use separate fields, for example,
|
2004-11-03 13:51:07 +00:00
|
|
|
.I sg_ispeed
|
|
|
|
and
|
|
|
|
.IR sg_ospeed .)
|
|
|
|
.TP
|
|
|
|
.B CSIZE
|
|
|
|
Character size mask.
|
|
|
|
Values are \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, or \fBCS8\fP.
|
|
|
|
.TP
|
|
|
|
.B CSTOPB
|
|
|
|
Set two stop bits, rather than one.
|
|
|
|
.TP
|
|
|
|
.B CREAD
|
|
|
|
Enable receiver.
|
|
|
|
.TP
|
|
|
|
.B PARENB
|
|
|
|
Enable parity generation on output and parity checking for input.
|
|
|
|
.TP
|
|
|
|
.B PARODD
|
2007-04-12 22:42:49 +00:00
|
|
|
If set, then parity for input and output is odd;
|
2006-12-28 09:16:52 +00:00
|
|
|
otherwise even parity is used.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B HUPCL
|
|
|
|
Lower modem control lines after last process closes the device (hang up).
|
|
|
|
.TP
|
|
|
|
.B CLOCAL
|
|
|
|
Ignore modem control lines.
|
|
|
|
.TP
|
|
|
|
.B LOBLK
|
accept.2, access.2, acct.2, clock_nanosleep.2, mbind.2, mincore.2, remap_file_pages.2, sched_setscheduler.2, set_mempolicy.2, splice.2, stat.2, syslog.2, timer_create.2, timerfd_create.2, truncate.2, fenv.3, ferror.3, fflush.3, fgetwc.3, fgetws.3, flockfile.3, fputwc.3, fputws.3, fread.3, getopt.3, gets.3, getwchar.3, glob.3, iconv.3, longjmp.3, pow.3, printf.3, puts.3, putwchar.3, regex.3, rpc.3, scanf.3, setjmp.3, termios.3, unlocked_stdio.3, wcswidth.3, hd.4, rtc.4, st.4, core.5, dir_colors.5, elf.5, proc.5, arp.7, ascii.7, boot.7, bootparam.7, charsets.7, futex.7, ip.7, iso_8859-11.7, man-pages.7, man.7, mdoc.samples.7, path_resolution.7, pipe.7, posixoptions.7, unicode.7, unix.7, uri.7, utf-8.7, ld.so.8: s/non-/non/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 17:20:12 +00:00
|
|
|
(not in POSIX) Block output from a noncurrent shell layer.
|
2006-05-08 21:37:17 +00:00
|
|
|
For use by \fBshl\fP (shell layers). (Not implemented on Linux.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B CIBAUD
|
2006-12-28 05:04:17 +00:00
|
|
|
(not in POSIX) Mask for input speeds.
|
2007-06-22 20:40:07 +00:00
|
|
|
The values for the
|
|
|
|
.B CIBAUD
|
|
|
|
bits are
|
|
|
|
the same as the values for the
|
|
|
|
.B CBAUD
|
|
|
|
bits, shifted left
|
|
|
|
.B IBSHIFT
|
|
|
|
bits.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2006-05-08 21:37:17 +00:00
|
|
|
(Not implemented on Linux.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2006-12-28 04:33:54 +00:00
|
|
|
.B CMSPAR
|
2006-12-28 04:36:23 +00:00
|
|
|
(not in POSIX)
|
2007-04-12 22:42:49 +00:00
|
|
|
Use "stick" (mark/space) parity (supported on certain serial
|
2006-12-28 05:04:17 +00:00
|
|
|
devices): if
|
2007-04-12 22:42:49 +00:00
|
|
|
.B PARODD
|
2006-12-28 04:33:54 +00:00
|
|
|
is set, the parity bit is always 1; if
|
2007-04-12 22:42:49 +00:00
|
|
|
.B PARODD
|
2014-05-05 17:37:32 +00:00
|
|
|
is not set, then the parity bit is always 0.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2006-12-28 04:33:54 +00:00
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B CRTSCTS
|
|
|
|
(not in POSIX) Enable RTS/CTS (hardware) flow control.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
|
|
|
\fIc_lflag\fP flag constants:
|
|
|
|
.TP
|
|
|
|
.B ISIG
|
|
|
|
When any of the characters INTR, QUIT, SUSP, or DSUSP are received,
|
|
|
|
generate the corresponding signal.
|
|
|
|
.TP
|
|
|
|
.B ICANON
|
2007-04-12 22:42:49 +00:00
|
|
|
Enable canonical mode (described below).
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B XCASE
|
|
|
|
(not in POSIX; not supported under Linux)
|
|
|
|
If \fBICANON\fP is also set, terminal is uppercase only.
|
|
|
|
Input is converted to lowercase, except for characters preceded by \\.
|
|
|
|
On output, uppercase characters are preceded by \\ and lowercase
|
|
|
|
characters are converted to uppercase.
|
2014-05-05 17:47:14 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
|
|
|
or
|
|
|
|
.B _SVID_SOURCE
|
|
|
|
or
|
|
|
|
.BR _XOPEN_SOURCE ]
|
2007-06-22 17:42:06 +00:00
|
|
|
.\" glibc is probably now wrong to allow
|
2007-08-27 08:22:11 +00:00
|
|
|
.\" Define
|
|
|
|
.\" .B _XOPEN_SOURCE
|
|
|
|
.\" to expose
|
|
|
|
.\" .BR XCASE .
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B ECHO
|
|
|
|
Echo input characters.
|
|
|
|
.TP
|
|
|
|
.B ECHOE
|
|
|
|
If \fBICANON\fP is also set, the ERASE character erases the preceding
|
|
|
|
input character, and WERASE erases the preceding word.
|
|
|
|
.TP
|
|
|
|
.B ECHOK
|
|
|
|
If \fBICANON\fP is also set, the KILL character erases the current line.
|
|
|
|
.TP
|
|
|
|
.B ECHONL
|
|
|
|
If \fBICANON\fP is also set, echo the NL character even if ECHO is not set.
|
|
|
|
.TP
|
|
|
|
.B ECHOCTL
|
2011-09-09 13:11:29 +00:00
|
|
|
(not in POSIX) If \fBECHO\fP is also set,
|
|
|
|
terminal special characters other than
|
2008-06-10 08:44:34 +00:00
|
|
|
TAB, NL, START, and STOP are echoed as \fB^X\fP,
|
|
|
|
where X is the character with
|
2011-09-09 13:11:29 +00:00
|
|
|
ASCII code 0x40 greater than the special character.
|
2007-04-12 22:42:49 +00:00
|
|
|
For example, character
|
2008-06-10 08:44:34 +00:00
|
|
|
0x08 (BS) is echoed as \fB^H\fP.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B ECHOPRT
|
2012-04-23 11:40:07 +00:00
|
|
|
(not in POSIX) If \fBICANON\fP and \fBECHO\fP are also set, characters
|
2004-11-03 13:51:07 +00:00
|
|
|
are printed as they are being erased.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B ECHOKE
|
|
|
|
(not in POSIX) If \fBICANON\fP is also set, KILL is echoed by erasing
|
|
|
|
each character on the line, as specified by \fBECHOE\fP and \fBECHOPRT\fP.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B DEFECHO
|
|
|
|
(not in POSIX) Echo only when a process is reading.
|
2006-05-08 21:37:17 +00:00
|
|
|
(Not implemented on Linux.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B FLUSHO
|
|
|
|
(not in POSIX; not supported under Linux)
|
2007-04-12 22:42:49 +00:00
|
|
|
Output is being flushed.
|
|
|
|
This flag is toggled by typing
|
2004-11-03 13:51:07 +00:00
|
|
|
the DISCARD character.
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B NOFLSH
|
2010-06-20 02:04:05 +00:00
|
|
|
Disable flushing the input and output queues when generating signals for the
|
|
|
|
INT, QUIT, and SUSP characters.
|
|
|
|
.\" Stevens lets SUSP only flush the input queue
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B TOSTOP
|
2007-06-21 05:38:48 +00:00
|
|
|
Send the
|
|
|
|
.B SIGTTOU
|
|
|
|
signal to the process group of a background process
|
2004-11-03 13:51:07 +00:00
|
|
|
which tries to write to its controlling terminal.
|
|
|
|
.TP
|
|
|
|
.B PENDIN
|
|
|
|
(not in POSIX; not supported under Linux)
|
|
|
|
All characters in the input queue are reprinted when
|
2007-04-12 22:42:49 +00:00
|
|
|
the next character is read.
|
2007-06-22 21:01:02 +00:00
|
|
|
.RB ( bash (1)
|
|
|
|
handles typeahead this way.)
|
2007-06-22 17:48:59 +00:00
|
|
|
[requires
|
|
|
|
.B _BSD_SOURCE
|
2007-06-22 18:04:14 +00:00
|
|
|
or
|
|
|
|
.BR _SVID_SOURCE ]
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B IEXTEN
|
|
|
|
Enable implementation-defined input processing.
|
2008-07-01 14:15:13 +00:00
|
|
|
This flag, as well as \fBICANON\fP must be enabled for the
|
2004-11-03 13:51:07 +00:00
|
|
|
special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted,
|
|
|
|
and for the \fBIUCLC\fP flag to be effective.
|
|
|
|
.PP
|
2011-09-09 13:11:29 +00:00
|
|
|
The \fIc_cc\fP array defines the terminal special characters.
|
2004-11-03 13:51:07 +00:00
|
|
|
The symbolic indices (initial values) and meaning are:
|
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VDISCARD
|
|
|
|
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
|
|
|
|
Toggle: start/stop discarding pending output.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B IEXTEN
|
2007-06-22 20:40:07 +00:00
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VDSUSP
|
|
|
|
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
|
2011-09-09 14:21:19 +00:00
|
|
|
Delayed suspend character (DSUSP):
|
2011-09-09 14:17:47 +00:00
|
|
|
send
|
|
|
|
.B SIGTSTP
|
|
|
|
signal when the character is read by the user program.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B IEXTEN
|
|
|
|
and
|
2007-06-22 20:40:07 +00:00
|
|
|
.B ISIG
|
2011-09-09 14:17:47 +00:00
|
|
|
are set, and the system supports
|
|
|
|
job control, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VEOF
|
|
|
|
(004, EOT, Ctrl-D)
|
2011-09-09 14:21:19 +00:00
|
|
|
End-of-file character (EOF).
|
2004-11-03 13:51:07 +00:00
|
|
|
More precisely: this character causes the pending tty buffer to be sent
|
|
|
|
to the waiting user program without waiting for end-of-line.
|
2007-05-12 13:12:02 +00:00
|
|
|
If it is the first character of the line, the
|
|
|
|
.BR read (2)
|
|
|
|
in the user program returns 0, which signifies end-of-file.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B ICANON
|
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VEOL
|
|
|
|
(0, NUL)
|
2011-09-09 14:21:19 +00:00
|
|
|
Additional end-of-line character (EOL).
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B ICANON
|
|
|
|
is set.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VEOL2
|
|
|
|
(not in POSIX; 0, NUL)
|
2011-09-09 14:21:19 +00:00
|
|
|
Yet another end-of-line character (EOL2).
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B ICANON
|
|
|
|
is set.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VERASE
|
|
|
|
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #)
|
2011-09-09 14:21:19 +00:00
|
|
|
Erase character (ERASE).
|
2011-09-09 14:17:47 +00:00
|
|
|
This erases the previous not-yet-erased character,
|
|
|
|
but does not erase past EOF or beginning-of-line.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B ICANON
|
2007-06-22 20:40:07 +00:00
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VINTR
|
|
|
|
(003, ETX, Ctrl-C, or also 0177, DEL, rubout)
|
2011-09-09 14:21:19 +00:00
|
|
|
Interrupt character (INTR).
|
2011-09-09 14:17:47 +00:00
|
|
|
Send a
|
|
|
|
.B SIGINT
|
2007-06-21 05:38:48 +00:00
|
|
|
signal.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B ISIG
|
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VKILL
|
|
|
|
(025, NAK, Ctrl-U, or Ctrl-X, or also @)
|
2011-09-09 14:21:19 +00:00
|
|
|
Kill character (KILL).
|
2011-09-09 14:17:47 +00:00
|
|
|
This erases the input since the last EOF or beginning-of-line.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B ICANON
|
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VLNEXT
|
|
|
|
(not in POSIX; 026, SYN, Ctrl-V)
|
2011-09-09 14:21:19 +00:00
|
|
|
Literal next (LNEXT).
|
2007-04-12 22:42:49 +00:00
|
|
|
Quotes the next input character, depriving it of
|
2004-11-03 13:51:07 +00:00
|
|
|
a possible special meaning.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B IEXTEN
|
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VMIN
|
2011-09-09 14:21:19 +00:00
|
|
|
Minimum number of characters for noncanonical read (MIN).
|
2011-09-09 14:17:47 +00:00
|
|
|
.TP
|
|
|
|
.B VQUIT
|
time.1, atexit.3, bsearch.3, dlopen.3, envz_add.3, errno.3, fmtmsg.3, getgrent_r.3, getline.3, getmntent.3, getnameinfo.3, getpass.3, getpwent_r.3, gets.3, isalpha.3, printf.3, puts.3, recno.3, scandir.3, stdarg.3, sysconf.3, termios.3, wordexp.3, null.4, core.5, dir_colors.5, issue.5, proc.5, termcap.5, utmp.5, ascii.7, cpuset.7, glob.7, man-pages.7, man.7, mdoc.7, mdoc.samples.7, regex.7: Revert 9f8e673e623d (whose global s%\\e%\\\\% caused problems)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-09-26 21:56:54 +00:00
|
|
|
(034, FS, Ctrl-\e)
|
2011-09-09 14:21:19 +00:00
|
|
|
Quit character (QUIT).
|
2011-09-09 14:17:47 +00:00
|
|
|
Send
|
|
|
|
.B SIGQUIT
|
|
|
|
signal.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B ISIG
|
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VREPRINT
|
|
|
|
(not in POSIX; 022, DC2, Ctrl-R)
|
2011-09-09 14:21:19 +00:00
|
|
|
Reprint unread characters (REPRINT).
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
|
|
|
.B ICANON
|
|
|
|
and
|
|
|
|
.B IEXTEN
|
|
|
|
are set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-09 14:17:47 +00:00
|
|
|
.B VSTART
|
|
|
|
(021, DC1, Ctrl-Q)
|
2011-09-09 14:21:19 +00:00
|
|
|
Start character (START).
|
2011-09-09 14:17:47 +00:00
|
|
|
Restarts output stopped by the Stop character.
|
2007-06-22 20:40:07 +00:00
|
|
|
Recognized when
|
2011-09-09 14:17:47 +00:00
|
|
|
.B IXON
|
2007-06-22 20:40:07 +00:00
|
|
|
is set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B VSTATUS
|
|
|
|
(not in POSIX; not supported under Linux;
|
|
|
|
status request: 024, DC4, Ctrl-T).
|
2011-09-09 13:17:51 +00:00
|
|
|
Status character (STATUS).
|
|
|
|
Display status information at terminal,
|
|
|
|
including state of foreground process and amount of CPU time it has consumed.
|
|
|
|
Also sends a
|
|
|
|
.BR SIGINFO
|
|
|
|
signal (not supported on Linux) to the foreground process group.
|
2011-09-09 14:17:47 +00:00
|
|
|
.TP
|
|
|
|
.B VSTOP
|
|
|
|
(023, DC3, Ctrl-S)
|
2011-09-09 14:21:19 +00:00
|
|
|
Stop character (STOP).
|
2011-09-09 14:17:47 +00:00
|
|
|
Stop output until Start character typed.
|
|
|
|
Recognized when
|
|
|
|
.B IXON
|
|
|
|
is set, and then not passed as input.
|
|
|
|
.TP
|
|
|
|
.B VSUSP
|
|
|
|
(032, SUB, Ctrl-Z)
|
2011-09-09 14:21:19 +00:00
|
|
|
Suspend character (SUSP).
|
2011-09-09 14:17:47 +00:00
|
|
|
Send
|
|
|
|
.B SIGTSTP
|
|
|
|
signal.
|
|
|
|
Recognized when
|
|
|
|
.B ISIG
|
|
|
|
is set, and then not passed as input.
|
|
|
|
.TP
|
|
|
|
.B VSWTCH
|
|
|
|
(not in POSIX; not supported under Linux; 0, NUL)
|
2011-09-09 14:21:19 +00:00
|
|
|
Switch character (SWTCH).
|
2011-09-09 14:25:37 +00:00
|
|
|
Used in System V to switch shells in
|
|
|
|
.IR "shell layers" ,
|
2011-10-03 05:45:24 +00:00
|
|
|
a predecessor to shell job control.
|
2011-09-09 14:17:47 +00:00
|
|
|
.TP
|
|
|
|
.B VTIME
|
2011-09-09 14:21:19 +00:00
|
|
|
Timeout in deciseconds for noncanonical read (TIME).
|
2011-09-09 14:17:47 +00:00
|
|
|
.TP
|
|
|
|
.B VWERASE
|
|
|
|
(not in POSIX; 027, ETB, Ctrl-W)
|
2011-09-09 14:21:19 +00:00
|
|
|
Word erase (WERASE).
|
2011-09-09 14:17:47 +00:00
|
|
|
Recognized when
|
|
|
|
.B ICANON
|
|
|
|
and
|
|
|
|
.B IEXTEN
|
|
|
|
are set, and then not passed as input.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2011-09-09 00:54:43 +00:00
|
|
|
An individual terminal special character can be disabled by setting
|
|
|
|
the value of the corresponding
|
|
|
|
.I c_cc
|
|
|
|
element to
|
|
|
|
.BR _POSIX_VDISABLE .
|
|
|
|
.LP
|
|
|
|
The above symbolic subscript values are all different, except that
|
2007-06-22 20:40:07 +00:00
|
|
|
.BR VTIME ,
|
2007-09-20 16:26:31 +00:00
|
|
|
.B VMIN
|
2007-06-22 20:40:07 +00:00
|
|
|
may have the same value as
|
2008-07-18 08:37:37 +00:00
|
|
|
.BR VEOL ,
|
2007-06-22 20:40:07 +00:00
|
|
|
.BR VEOF ,
|
|
|
|
respectively.
|
2010-01-16 16:54:51 +00:00
|
|
|
In noncanonical mode the special character meaning is replaced
|
2007-04-12 22:42:49 +00:00
|
|
|
by the timeout meaning.
|
2007-06-22 20:40:07 +00:00
|
|
|
For an explanation of
|
|
|
|
.B VMIN
|
|
|
|
and
|
|
|
|
.BR VTIME ,
|
|
|
|
see the description of
|
2010-01-16 16:54:51 +00:00
|
|
|
noncanonical mode below.
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS Retrieving and changing terminal settings
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcgetattr ()
|
2004-11-03 13:51:07 +00:00
|
|
|
gets the parameters associated with the object referred by \fIfd\fP and
|
2006-04-15 00:39:29 +00:00
|
|
|
stores them in the \fItermios\fP structure referenced by
|
2007-04-12 22:42:49 +00:00
|
|
|
\fItermios_p\fP.
|
|
|
|
This function may be invoked from a background process;
|
2004-11-03 13:51:07 +00:00
|
|
|
however, the terminal attributes may be subsequently changed by a
|
|
|
|
foreground process.
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcsetattr ()
|
2004-11-03 13:51:07 +00:00
|
|
|
sets the parameters associated with the terminal (unless support is
|
|
|
|
required from the underlying hardware that is not available) from the
|
2007-04-12 22:42:49 +00:00
|
|
|
\fItermios\fP structure referred to by \fItermios_p\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
\fIoptional_actions\fP specifies when the changes take effect:
|
|
|
|
.IP \fBTCSANOW\fP
|
|
|
|
the change occurs immediately.
|
|
|
|
.IP \fBTCSADRAIN\fP
|
|
|
|
the change occurs after all output written to
|
|
|
|
.I fd
|
2007-04-12 22:42:49 +00:00
|
|
|
has been transmitted.
|
2014-05-09 05:13:25 +00:00
|
|
|
This option should be used when changing
|
2004-11-03 13:51:07 +00:00
|
|
|
parameters that affect output.
|
|
|
|
.IP \fBTCSAFLUSH\fP
|
|
|
|
the change occurs after all output written to the object referred by
|
|
|
|
.I fd
|
|
|
|
has been transmitted, and all input that has been received but not read
|
|
|
|
will be discarded before the change is made.
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS Canonical and noncanonical mode
|
2006-12-28 09:16:52 +00:00
|
|
|
The setting of the
|
|
|
|
.B ICANON
|
|
|
|
canon flag in
|
|
|
|
.I c_lflag
|
|
|
|
determines whether the terminal is operating in canonical mode
|
|
|
|
.RB ( ICANON
|
|
|
|
set) or
|
2010-01-16 16:54:51 +00:00
|
|
|
noncanonical mode
|
2007-04-12 22:42:49 +00:00
|
|
|
.RB ( ICANON
|
2006-12-28 09:16:52 +00:00
|
|
|
unset).
|
|
|
|
By default,
|
|
|
|
.B ICANON
|
2016-06-05 21:09:28 +00:00
|
|
|
is set.
|
2006-12-28 09:16:52 +00:00
|
|
|
|
|
|
|
In canonical mode:
|
|
|
|
.IP * 2
|
|
|
|
Input is made available line by line.
|
|
|
|
An input line is available when one of the line delimiters
|
|
|
|
is typed (NL, EOL, EOL2; or EOF at the start of line).
|
|
|
|
Except in the case of EOF, the line delimiter is included
|
|
|
|
in the buffer returned by
|
|
|
|
.BR read (2).
|
|
|
|
.IP * 2
|
2007-04-12 22:42:49 +00:00
|
|
|
Line editing is enabled (ERASE, KILL;
|
|
|
|
and if the
|
2006-12-28 09:16:52 +00:00
|
|
|
.B IEXTEN
|
|
|
|
flag is set: WERASE, REPRINT, LNEXT).
|
2007-04-12 22:42:49 +00:00
|
|
|
A
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
returns at most one line of input; if the
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
requested fewer bytes than are available in the current line of input,
|
|
|
|
then only as many bytes as requested are read,
|
|
|
|
and the remaining characters will be available for a future
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2).
|
2016-02-15 13:26:59 +00:00
|
|
|
.IP * 2
|
2016-02-15 15:24:50 +00:00
|
|
|
The maximum line length is 4096 chars
|
|
|
|
(including the terminating newline character);
|
|
|
|
lines longer than 4096 chars are truncated.
|
2016-02-18 11:23:21 +00:00
|
|
|
After 4095 characters, input processing (e.g.,
|
|
|
|
.B ISIG
|
|
|
|
and
|
|
|
|
.B ECHO*
|
|
|
|
processing) continues, but any input data after 4095 characters up to
|
|
|
|
(but not including) any terminating newline is discarded.
|
2016-02-15 15:24:50 +00:00
|
|
|
This ensures that the terminal can always receive
|
|
|
|
more input until at least one line can be read.
|
2006-12-28 09:16:52 +00:00
|
|
|
.PP
|
2010-01-16 16:54:51 +00:00
|
|
|
In noncanonical mode input is available immediately (without
|
2006-12-28 09:16:52 +00:00
|
|
|
the user having to type a line-delimiter character),
|
2013-03-10 12:04:00 +00:00
|
|
|
no input processing is performed,
|
2006-12-28 09:16:52 +00:00
|
|
|
and line editing is disabled.
|
2016-02-15 13:26:59 +00:00
|
|
|
The read buffer will only accept 4095 chars; this provides the
|
|
|
|
necessary space for a newline char if the input mode is switched
|
|
|
|
to canonical.
|
2007-04-12 22:42:49 +00:00
|
|
|
The settings of MIN
|
2006-12-28 09:16:52 +00:00
|
|
|
.RI ( c_cc[VMIN] )
|
2007-05-11 18:37:19 +00:00
|
|
|
and TIME
|
2006-12-28 09:16:52 +00:00
|
|
|
.RI ( c_cc[VTIME] )
|
|
|
|
determine the circumstances in which a
|
|
|
|
.BR read (2)
|
|
|
|
completes; there are four distinct cases:
|
2014-03-21 09:35:07 +00:00
|
|
|
.TP
|
2014-03-21 14:15:06 +00:00
|
|
|
MIN == 0, TIME == 0 (polling read)
|
2006-12-28 09:16:52 +00:00
|
|
|
If data is available,
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
returns immediately, with the lesser of the number of bytes
|
|
|
|
available, or the number of bytes requested.
|
|
|
|
If no data is available,
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
returns 0.
|
2014-03-21 09:35:07 +00:00
|
|
|
.TP
|
2014-03-21 14:15:06 +00:00
|
|
|
MIN > 0, TIME == 0 (blocking read)
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2014-03-21 09:42:12 +00:00
|
|
|
blocks until MIN bytes are available,
|
|
|
|
and returns up to the number of bytes requested.
|
2014-03-21 09:35:07 +00:00
|
|
|
.TP
|
2014-03-21 14:15:06 +00:00
|
|
|
MIN == 0, TIME > 0 (read with timeout)
|
2006-12-28 09:16:52 +00:00
|
|
|
TIME specifies the limit for a timer in tenths of a second.
|
2007-04-12 22:42:49 +00:00
|
|
|
The timer is started when
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
is called.
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
returns either when at least one byte of data is available,
|
|
|
|
or when the timer expires.
|
|
|
|
If the timer expires without any input becoming available,
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2006-12-28 09:16:52 +00:00
|
|
|
returns 0.
|
2014-03-21 14:10:47 +00:00
|
|
|
If data is already available at the time of the call to
|
2014-04-17 00:20:28 +00:00
|
|
|
.BR read (2),
|
2014-03-21 14:10:47 +00:00
|
|
|
the call behaves as though the data was received immediately after the call.
|
2014-03-21 09:35:07 +00:00
|
|
|
.TP
|
2014-03-21 14:15:06 +00:00
|
|
|
MIN > 0, TIME > 0 (read with interbyte timeout)
|
2006-12-28 09:16:52 +00:00
|
|
|
TIME specifies the limit for a timer in tenths of a second.
|
|
|
|
Once an initial byte of input becomes available,
|
|
|
|
the timer is restarted after each further byte is received.
|
2007-05-12 00:30:29 +00:00
|
|
|
.BR read (2)
|
2014-03-21 14:13:24 +00:00
|
|
|
returns when any of the following conditions is met:
|
|
|
|
.RS
|
|
|
|
.IP * 3
|
|
|
|
MIN bytes have been received.
|
|
|
|
.IP *
|
|
|
|
The interbyte timer expires.
|
|
|
|
.IP *
|
|
|
|
The number of bytes requested by
|
|
|
|
.BR read (2)
|
|
|
|
has been received.
|
|
|
|
(POSIX does not specify this termination condition,
|
|
|
|
and on some other implementations
|
|
|
|
.\" e.g., Solaris
|
2014-04-17 00:20:28 +00:00
|
|
|
.BR read (2)
|
2014-03-21 14:13:24 +00:00
|
|
|
does not return in this case.)
|
|
|
|
.RE
|
|
|
|
.IP
|
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
|
|
|
Because the timer is started only after the initial byte
|
2006-12-28 09:16:52 +00:00
|
|
|
becomes available, at least one byte will be read.
|
2014-03-21 14:10:47 +00:00
|
|
|
If data is already available at the time of the call to
|
2014-04-17 00:20:28 +00:00
|
|
|
.BR read (2),
|
2014-03-21 14:10:47 +00:00
|
|
|
the call behaves as though the data was received immediately after the call.
|
2014-03-21 10:45:42 +00:00
|
|
|
.PP
|
|
|
|
POSIX
|
|
|
|
.\" POSIX.1-2008 XBD 11.1.7
|
|
|
|
does not specify whether the setting of the
|
|
|
|
.B O_NONBLOCK
|
|
|
|
file status flag takes precedence over the MIN and TIME settings.
|
|
|
|
If
|
|
|
|
.B O_NONBLOCK
|
|
|
|
is set, a
|
2014-04-17 00:20:28 +00:00
|
|
|
.BR read (2)
|
2014-03-21 10:45:42 +00:00
|
|
|
in noncanonical mode may return immediately,
|
|
|
|
regardless of the setting of MIN or TIME.
|
|
|
|
Furthermore, if no data is available,
|
|
|
|
POSIX permits a
|
2014-04-17 00:20:28 +00:00
|
|
|
.BR read (2)
|
2014-03-21 10:45:42 +00:00
|
|
|
in noncanonical mode to return either 0, or \-1 with
|
|
|
|
.I errno
|
|
|
|
set to
|
|
|
|
.BR EAGAIN .
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS Raw mode
|
2006-12-28 09:16:52 +00:00
|
|
|
.LP
|
2007-05-12 09:06:04 +00:00
|
|
|
.BR cfmakeraw ()
|
|
|
|
sets the terminal to something like the
|
2007-03-01 01:12:16 +00:00
|
|
|
"raw" mode of the old Version 7 terminal driver:
|
2006-12-28 09:16:52 +00:00
|
|
|
input is available character by character,
|
2007-04-12 22:42:49 +00:00
|
|
|
echoing is disabled, and all special processing of
|
2006-12-28 09:16:52 +00:00
|
|
|
terminal input and output characters is disabled.
|
|
|
|
The terminal attributes are set as follows:
|
|
|
|
.nf
|
|
|
|
|
2007-12-22 16:40:46 +00:00
|
|
|
termios_p\->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
|
2006-12-28 09:16:52 +00:00
|
|
|
| INLCR | IGNCR | ICRNL | IXON);
|
2007-12-22 16:40:46 +00:00
|
|
|
termios_p\->c_oflag &= ~OPOST;
|
|
|
|
termios_p\->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
|
|
|
|
termios_p\->c_cflag &= ~(CSIZE | PARENB);
|
|
|
|
termios_p\->c_cflag |= CS8;
|
2006-12-28 09:16:52 +00:00
|
|
|
.fi
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS Line control
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcsendbreak ()
|
2004-11-03 13:51:07 +00:00
|
|
|
transmits a continuous stream of zero-valued bits for a specific
|
|
|
|
duration, if the terminal is using asynchronous serial data
|
2007-04-12 22:42:49 +00:00
|
|
|
transmission.
|
|
|
|
If \fIduration\fP is zero, it transmits zero-valued bits
|
|
|
|
for at least 0.25 seconds, and not more that 0.5 seconds.
|
|
|
|
If \fIduration\fP is not zero, it sends zero-valued bits for some
|
2004-11-03 13:51:07 +00:00
|
|
|
implementation-defined length of time.
|
|
|
|
.LP
|
|
|
|
If the terminal is not using asynchronous serial data transmission,
|
2007-05-12 09:06:04 +00:00
|
|
|
.BR tcsendbreak ()
|
|
|
|
returns without taking any action.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcdrain ()
|
2004-11-03 13:51:07 +00:00
|
|
|
waits until all output written to the object referred to by
|
|
|
|
.I fd
|
|
|
|
has been transmitted.
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcflush ()
|
2004-11-03 13:51:07 +00:00
|
|
|
discards data written to the object referred to by
|
|
|
|
.I fd
|
|
|
|
but not transmitted, or data received but not read, depending on the
|
|
|
|
value of
|
|
|
|
.IR queue_selector :
|
|
|
|
.IP \fBTCIFLUSH\fP
|
|
|
|
flushes data received but not read.
|
|
|
|
.IP \fBTCOFLUSH\fP
|
|
|
|
flushes data written but not transmitted.
|
|
|
|
.IP \fBTCIOFLUSH\fP
|
|
|
|
flushes both data received but not read, and data written but not
|
|
|
|
transmitted.
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR tcflow ()
|
2004-11-03 13:51:07 +00:00
|
|
|
suspends transmission or reception of data on the object referred to by
|
|
|
|
.IR fd ,
|
|
|
|
depending on the value of
|
|
|
|
.IR action :
|
|
|
|
.IP \fBTCOOFF\fP
|
|
|
|
suspends output.
|
|
|
|
.IP \fBTCOON\fP
|
|
|
|
restarts suspended output.
|
|
|
|
.IP \fBTCIOFF\fP
|
2007-04-12 22:42:49 +00:00
|
|
|
transmits a STOP character, which stops the terminal device from
|
2006-12-27 03:54:41 +00:00
|
|
|
transmitting data to the system.
|
2004-11-03 13:51:07 +00:00
|
|
|
.IP \fBTCION\fP
|
2007-04-12 22:42:49 +00:00
|
|
|
transmits a START character, which starts the terminal device
|
2006-12-27 03:54:41 +00:00
|
|
|
transmitting data to the system.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
|
|
|
The default on open of a terminal file is that neither its input nor its
|
|
|
|
output is suspended.
|
intro.1, time.1, _syscall.2, accept.2, capget.2, clone.2, execve.2, fcntl.2, intro.2, ioctl_list.2, ioprio_set.2, kill.2, mlock.2, nanosleep.2, perf_event_open.2, select.2, stat.2, times.2, ustat.2, vfork.2, wait.2, cfree.3, dbopen.3, dlopen.3, fenv.3, fmtmsg.3, gamma.3, getaddrinfo.3, gethostbyname.3, getnameinfo.3, getspnam.3, login.3, printf.3, regex.3, stdio.3, sysconf.3, termios.3, ttyslot.3, undocumented.3, wordexp.3, console_codes.4, initrd.4, mouse.4, random.4, st.4, tty_ioctl.4, wavelan.4, charmap.5, dir_colors.5, hosts.5, termcap.5, armscii-8.7, boot.7, bootparam.7, capabilities.7, charsets.7, ddp.7, futex.7, glob.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man.7, numa.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, rtnetlink.7, signal.7, time.7, udp.7, udplite.7, unicode.7, uri.7, utf-8.7: G;lobal fix: remove unneeded double quotes in .SS headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:02:18 +00:00
|
|
|
.SS Line speed
|
2006-12-28 05:17:28 +00:00
|
|
|
The baud rate functions are provided for getting and setting the values
|
2007-04-12 22:42:49 +00:00
|
|
|
of the input and output baud rates in the \fItermios\fP structure.
|
|
|
|
The new values do not take effect
|
2007-05-12 09:06:04 +00:00
|
|
|
until
|
|
|
|
.BR tcsetattr ()
|
|
|
|
is successfully called.
|
2006-12-28 05:17:28 +00:00
|
|
|
|
|
|
|
Setting the speed to \fBB0\fP instructs the modem to "hang up".
|
|
|
|
The actual bit rate corresponding to \fBB38400\fP may be altered with
|
2007-05-12 09:06:04 +00:00
|
|
|
.BR setserial (8).
|
2006-12-28 05:17:28 +00:00
|
|
|
.LP
|
|
|
|
The input and output baud rates are stored in the \fItermios\fP
|
|
|
|
structure.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfgetospeed ()
|
2006-04-15 00:39:29 +00:00
|
|
|
returns the output baud rate stored in the \fItermios\fP structure
|
2004-11-03 13:51:07 +00:00
|
|
|
pointed to by
|
|
|
|
.IR termios_p .
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfsetospeed ()
|
2006-04-15 00:39:29 +00:00
|
|
|
sets the output baud rate stored in the \fItermios\fP structure pointed
|
2004-11-03 13:51:07 +00:00
|
|
|
to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
|
|
|
|
.nf
|
2006-04-15 00:39:29 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.ft B
|
|
|
|
B0
|
|
|
|
B50
|
|
|
|
B75
|
|
|
|
B110
|
|
|
|
B134
|
|
|
|
B150
|
|
|
|
B200
|
|
|
|
B300
|
|
|
|
B600
|
|
|
|
B1200
|
|
|
|
B1800
|
|
|
|
B2400
|
|
|
|
B4800
|
|
|
|
B9600
|
|
|
|
B19200
|
|
|
|
B38400
|
|
|
|
B57600
|
|
|
|
B115200
|
|
|
|
B230400
|
|
|
|
.ft P
|
2006-04-15 00:39:29 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
|
|
|
The zero baud rate, \fBB0\fP,
|
2007-04-12 22:42:49 +00:00
|
|
|
is used to terminate the connection.
|
|
|
|
If B0 is specified, the modem control lines shall no longer be asserted.
|
2007-05-12 13:26:09 +00:00
|
|
|
Normally, this will disconnect the line.
|
|
|
|
\fBCBAUDEX\fP is a mask
|
2004-11-03 13:51:07 +00:00
|
|
|
for the speeds beyond those defined in POSIX.1 (57600 and above).
|
intro.1, time.1, adjtimex.2, capget.2, eventfd.2, fcntl.2, getrlimit.2, getsockopt.2, gettimeofday.2, intro.2, ioctl_list.2, ioperm.2, mlock.2, pivot_root.2, poll.2, prctl.2, ptrace.2, sched_setscheduler.2, select_tut.2, semget.2, sigaltstack.2, signalfd.2, sysctl.2, timer_settime.2, timerfd_create.2, wait.2, CPU_SET.3, argz_add.3, assert_perror.3, atexit.3, backtrace.3, bcmp.3, clearenv.3, ctime.3, dl_iterate_phdr.3, dlopen.3, ecvt.3, errno.3, error.3, ether_aton.3, exit.3, fenv.3, ferror.3, finite.3, flockfile.3, fnmatch.3, fpathconf.3, fpclassify.3, ftime.3, ftok.3, ftw.3, fwide.3, getaddrinfo.3, gethostbyname.3, getlogin.3, getnameinfo.3, getnetent.3, getopt.3, getprotoent.3, getrpcent.3, getservent.3, glob.3, hsearch.3, inet.3, isalpha.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, longjmp.3, lsearch.3, malloc.3, matherr.3, mblen.3, mbsinit.3, mbtowc.3, on_exit.3, printf.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_equal.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, ptsname.3, putenv.3, putgrent.3, raise.3, rcmd.3, regex.3, rexec.3, rpc.3, rpmatch.3, rtnetlink.3, scandir.3, sem_init.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, signbit.3, stdio_ext.3, strtod.3, strtol.3, strtoul.3, system.3, termios.3, timeradd.3, tzset.3, ualarm.3, wctomb.3, xdr.3, st.4, tty_ioctl.4, core.5, elf.5, proc.5, bootparam.7, capabilities.7, icmp.7, ip.7, ipv6.7, math_error.7, mdoc.samples.7, mq_overview.7, pthreads.7, raw.7, regex.7, socket.7, tcp.7, tzselect.8: Global fix: s/non-zero/nonzero/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:40:55 +00:00
|
|
|
Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfgetispeed ()
|
2006-04-15 00:39:29 +00:00
|
|
|
returns the input baud rate stored in the \fItermios\fP structure.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfsetispeed ()
|
2006-04-15 00:39:29 +00:00
|
|
|
sets the input baud rate stored in the \fItermios\fP structure to
|
2007-04-12 22:42:49 +00:00
|
|
|
.IR speed ,
|
2006-04-15 00:39:29 +00:00
|
|
|
which must be specified as one of the \fBBnnn\fP constants listed above for
|
|
|
|
.BR cfsetospeed ().
|
2004-11-03 13:51:07 +00:00
|
|
|
If the input baud rate is set to zero, the input baud rate will be
|
|
|
|
equal to the output baud rate.
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfsetspeed ()
|
2007-04-12 22:42:49 +00:00
|
|
|
is a 4.4BSD extension.
|
|
|
|
It takes the same arguments as
|
2006-04-15 00:39:29 +00:00
|
|
|
.BR cfsetispeed (),
|
|
|
|
and sets both input and output speed.
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH RETURN VALUE
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfgetispeed ()
|
2004-11-03 13:51:07 +00:00
|
|
|
returns the input baud rate stored in the
|
2006-04-15 00:39:29 +00:00
|
|
|
\fItermios\fP
|
2004-11-03 13:51:07 +00:00
|
|
|
structure.
|
|
|
|
.LP
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR cfgetospeed ()
|
2006-04-15 00:39:29 +00:00
|
|
|
returns the output baud rate stored in the \fItermios\fP structure.
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
|
|
|
All other functions return:
|
|
|
|
.IP 0
|
|
|
|
on success.
|
|
|
|
.IP \-1
|
|
|
|
on failure and set
|
|
|
|
.I errno
|
|
|
|
to indicate the error.
|
|
|
|
.LP
|
|
|
|
Note that
|
2005-10-19 16:30:05 +00:00
|
|
|
.BR tcsetattr ()
|
2004-11-03 13:51:07 +00:00
|
|
|
returns success if \fIany\fP of the requested changes could be
|
2007-04-12 22:42:49 +00:00
|
|
|
successfully carried out.
|
|
|
|
Therefore, when making multiple changes
|
2004-11-03 13:51:07 +00:00
|
|
|
it may be necessary to follow this call with a further call to
|
2005-10-19 16:30:05 +00:00
|
|
|
.BR tcgetattr ()
|
2004-11-03 13:51:07 +00:00
|
|
|
to check that all changes have been performed successfully.
|
termios.3: ATTRIBUTES: Note functions that are thread-safe
The functions tcgetattr(), tcsetattr(), tcsendbreak(),
tcdrain(), tcflush(), tcflow(), cfmakeraw(), cfgetispeed(),
cfgetospeed(), cfsetispeed(), cfsetospeed() and cfsetspeed()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-10-22 08:03:03 +00:00
|
|
|
.SH ATTRIBUTES
|
2014-07-21 04:15:28 +00:00
|
|
|
For an explanation of the terms used in this section, see
|
|
|
|
.BR attributes (7).
|
|
|
|
.nh
|
|
|
|
.ad l
|
|
|
|
.TS
|
|
|
|
allbox;
|
2015-01-21 13:50:27 +00:00
|
|
|
lbw36 lb lb
|
2015-01-21 07:40:12 +00:00
|
|
|
l l l.
|
2014-07-21 04:15:28 +00:00
|
|
|
Interface Attribute Value
|
|
|
|
T{
|
termios.3: ATTRIBUTES: Note functions that are thread-safe
The functions tcgetattr(), tcsetattr(), tcsendbreak(),
tcdrain(), tcflush(), tcflow(), cfmakeraw(), cfgetispeed(),
cfgetospeed(), cfsetispeed(), cfsetospeed() and cfsetspeed()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-10-22 08:03:03 +00:00
|
|
|
.BR tcgetattr (),
|
|
|
|
.BR tcsetattr (),
|
|
|
|
.BR tcdrain (),
|
|
|
|
.BR tcflush (),
|
2015-01-21 09:07:34 +00:00
|
|
|
.BR tcflow (),
|
2015-01-21 13:50:27 +00:00
|
|
|
.BR tcsendbreak (),
|
termios.3: ATTRIBUTES: Note functions that are thread-safe
The functions tcgetattr(), tcsetattr(), tcsendbreak(),
tcdrain(), tcflush(), tcflow(), cfmakeraw(), cfgetispeed(),
cfgetospeed(), cfsetispeed(), cfsetospeed() and cfsetspeed()
are thread safe.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-10-22 08:03:03 +00:00
|
|
|
.BR cfmakeraw (),
|
|
|
|
.BR cfgetispeed (),
|
|
|
|
.BR cfgetospeed (),
|
|
|
|
.BR cfsetispeed (),
|
|
|
|
.BR cfsetospeed (),
|
|
|
|
.BR cfsetspeed ()
|
2016-10-29 10:41:27 +00:00
|
|
|
T} Thread safety MT-Safe
|
|
|
|
.TE
|
|
|
|
.\" FIXME: The markings are different from that in the glibc manual.
|
|
|
|
.\" markings in glibc manual are more detailed:
|
|
|
|
.\"
|
|
|
|
.\" tcsendbreak: MT-Unsafe race:tcattr(filedes)/bsd
|
|
|
|
.\" tcflow: MT-Unsafe race:tcattr(filedes)/bsd
|
|
|
|
.\"
|
2015-08-24 10:19:56 +00:00
|
|
|
.\" glibc manual says /bsd indicate the preceding marker only applies
|
2015-12-02 19:21:09 +00:00
|
|
|
.\" when the underlying kernel is a BSD kernel.
|
2015-08-24 10:19:56 +00:00
|
|
|
.\" So, it is safety in Linux kernel.
|
2014-07-21 04:15:28 +00:00
|
|
|
.ad
|
|
|
|
.hy
|
2007-06-16 08:11:31 +00:00
|
|
|
.SH CONFORMING TO
|
|
|
|
.BR tcgetattr (),
|
|
|
|
.BR tcsetattr (),
|
|
|
|
.BR tcsendbreak (),
|
|
|
|
.BR tcdrain (),
|
|
|
|
.BR tcflush (),
|
|
|
|
.BR tcflow (),
|
|
|
|
.BR cfgetispeed (),
|
|
|
|
.BR cfgetospeed (),
|
|
|
|
.BR cfsetispeed (),
|
|
|
|
and
|
|
|
|
.BR cfsetospeed ()
|
|
|
|
are specified in POSIX.1-2001.
|
|
|
|
|
|
|
|
.BR cfmakeraw ()
|
2007-11-19 18:45:15 +00:00
|
|
|
and
|
|
|
|
.BR cfsetspeed ()
|
accept.2, execve.2, futimesat.2, getresuid.2, getrlimit.2, madvise.2, mq_getsetattr.2, msgctl.2, nice.2, open.2, poll.2, setresuid.2, shmctl.2, sigaction.2, times.2, utimensat.2, __setfpucw.3, atoi.3, endian.3, err.3, euidaccess.3, fenv.3, fopencookie.3, fpurge.3, getgrouplist.3, getutmp.3, j0.3, lgamma.3, netlink.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_cleanup_push_defer_np.3, pthread_getattr_np.3, pthread_kill_other_threads_np.3, pthread_setaffinity_np.3, pthread_tryjoin_np.3, pthread_yield.3, random_r.3, readdir.3, rtnetlink.3, scanf.3, setenv.3, significand.3, sigsetops.3, strerror.3, strstr.3, sysv_signal.3, termios.3, timegm.3, unlocked_stdio.3, y0.3, locale.5, bootparam.7, feature_test_macros.7, ip.7, locale.7, pthreads.7, rtld-audit.7, nscd.8: Global fix: s/non-standard/nonstandard/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:37:52 +00:00
|
|
|
are nonstandard, but available on the BSDs.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NOTES
|
2014-05-07 01:09:57 +00:00
|
|
|
UNIX\ V7 and several later systems have a list of baud rates
|
2004-11-03 13:51:07 +00:00
|
|
|
where after the fourteen values B0, ..., B9600 one finds the
|
|
|
|
two constants EXTA, EXTB ("External A" and "External B").
|
|
|
|
Many systems extend the list with much higher baud rates.
|
|
|
|
.LP
|
intro.1, time.1, adjtimex.2, capget.2, eventfd.2, fcntl.2, getrlimit.2, getsockopt.2, gettimeofday.2, intro.2, ioctl_list.2, ioperm.2, mlock.2, pivot_root.2, poll.2, prctl.2, ptrace.2, sched_setscheduler.2, select_tut.2, semget.2, sigaltstack.2, signalfd.2, sysctl.2, timer_settime.2, timerfd_create.2, wait.2, CPU_SET.3, argz_add.3, assert_perror.3, atexit.3, backtrace.3, bcmp.3, clearenv.3, ctime.3, dl_iterate_phdr.3, dlopen.3, ecvt.3, errno.3, error.3, ether_aton.3, exit.3, fenv.3, ferror.3, finite.3, flockfile.3, fnmatch.3, fpathconf.3, fpclassify.3, ftime.3, ftok.3, ftw.3, fwide.3, getaddrinfo.3, gethostbyname.3, getlogin.3, getnameinfo.3, getnetent.3, getopt.3, getprotoent.3, getrpcent.3, getservent.3, glob.3, hsearch.3, inet.3, isalpha.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, longjmp.3, lsearch.3, malloc.3, matherr.3, mblen.3, mbsinit.3, mbtowc.3, on_exit.3, printf.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_equal.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, ptsname.3, putenv.3, putgrent.3, raise.3, rcmd.3, regex.3, rexec.3, rpc.3, rpmatch.3, rtnetlink.3, scandir.3, sem_init.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, signbit.3, stdio_ext.3, strtod.3, strtol.3, strtoul.3, system.3, termios.3, timeradd.3, tzset.3, ualarm.3, wctomb.3, xdr.3, st.4, tty_ioctl.4, core.5, elf.5, proc.5, bootparam.7, capabilities.7, icmp.7, ip.7, ipv6.7, math_error.7, mdoc.samples.7, mq_overview.7, pthreads.7, raw.7, regex.7, socket.7, tcp.7, tzselect.8: Global fix: s/non-zero/nonzero/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:40:55 +00:00
|
|
|
The effect of a nonzero \fIduration\fP with
|
2007-05-12 09:06:04 +00:00
|
|
|
.BR tcsendbreak ()
|
|
|
|
varies.
|
2007-04-12 22:42:49 +00:00
|
|
|
SunOS specifies a break of
|
2008-07-14 15:57:53 +00:00
|
|
|
.I "duration\ *\ N"
|
2004-11-03 13:51:07 +00:00
|
|
|
seconds, where \fIN\fP is at least 0.25, and not more than 0.5.
|
|
|
|
Linux, AIX, DU, Tru64 send a break of
|
|
|
|
.I duration
|
|
|
|
milliseconds.
|
|
|
|
FreeBSD and NetBSD and HP-UX and MacOS ignore the value of
|
|
|
|
.IR duration .
|
2010-10-12 04:44:46 +00:00
|
|
|
Under Solaris and UnixWare,
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR tcsendbreak ()
|
intro.1, time.1, adjtimex.2, capget.2, eventfd.2, fcntl.2, getrlimit.2, getsockopt.2, gettimeofday.2, intro.2, ioctl_list.2, ioperm.2, mlock.2, pivot_root.2, poll.2, prctl.2, ptrace.2, sched_setscheduler.2, select_tut.2, semget.2, sigaltstack.2, signalfd.2, sysctl.2, timer_settime.2, timerfd_create.2, wait.2, CPU_SET.3, argz_add.3, assert_perror.3, atexit.3, backtrace.3, bcmp.3, clearenv.3, ctime.3, dl_iterate_phdr.3, dlopen.3, ecvt.3, errno.3, error.3, ether_aton.3, exit.3, fenv.3, ferror.3, finite.3, flockfile.3, fnmatch.3, fpathconf.3, fpclassify.3, ftime.3, ftok.3, ftw.3, fwide.3, getaddrinfo.3, gethostbyname.3, getlogin.3, getnameinfo.3, getnetent.3, getopt.3, getprotoent.3, getrpcent.3, getservent.3, glob.3, hsearch.3, inet.3, isalpha.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, longjmp.3, lsearch.3, malloc.3, matherr.3, mblen.3, mbsinit.3, mbtowc.3, on_exit.3, printf.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_equal.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, ptsname.3, putenv.3, putgrent.3, raise.3, rcmd.3, regex.3, rexec.3, rpc.3, rpmatch.3, rtnetlink.3, scandir.3, sem_init.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, signbit.3, stdio_ext.3, strtod.3, strtol.3, strtoul.3, system.3, termios.3, timeradd.3, tzset.3, ualarm.3, wctomb.3, xdr.3, st.4, tty_ioctl.4, core.5, elf.5, proc.5, bootparam.7, capabilities.7, icmp.7, ip.7, ipv6.7, math_error.7, mdoc.samples.7, mq_overview.7, pthreads.7, raw.7, regex.7, socket.7, tcp.7, tzselect.8: Global fix: s/non-zero/nonzero/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:40:55 +00:00
|
|
|
with nonzero
|
2004-11-03 13:51:07 +00:00
|
|
|
.I duration
|
|
|
|
behaves like
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR tcdrain ().
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" libc4 until 4.7.5, glibc for sysv: EINVAL for duration > 0.
|
|
|
|
.\" libc4.7.6, libc5, glibc for unix: duration in ms.
|
|
|
|
.\" glibc for bsd: duration in us
|
|
|
|
.\" glibc for sunos4: ignore duration
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH SEE ALSO
|
2015-02-01 08:24:28 +00:00
|
|
|
.BR reset (1),
|
|
|
|
.BR setterm (1),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR stty (1),
|
2015-02-01 08:24:28 +00:00
|
|
|
.BR tput (1),
|
2014-11-13 10:08:55 +00:00
|
|
|
.BR tset (1),
|
2016-02-26 12:20:09 +00:00
|
|
|
.BR tty (1),
|
2006-12-23 18:08:49 +00:00
|
|
|
.BR console_ioctl (4),
|
|
|
|
.BR tty_ioctl (4),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR setserial (8)
|