---
name: "TIOCGSOFTCAR"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/TIOCSSOFTCAR"
---

# TIOCGSOFTCAR(2const)

marking a line as local

Part of [TIOCSSOFTCAR(2const)](/TIOCSSOFTCAR/2const.md).

## NAME

TIOCGSOFTCAR, TIOCSSOFTCAR - marking a line as local

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <asm/termbits.h>  /* Definition of TIOC*SOFTCAR constants */
#include <sys/ioctl.h>
```

**int ioctl(int** *fd***, TIOCGSOFTCAR, int \****argp***);** **int ioctl(int** *fd***, TIOCSSOFTCAR, const int \****argp***);**

## DESCRIPTION

- **TIOCGSOFTCAR**

  ("Get software carrier flag") Get the status of the CLOCAL flag in the c\_cflag field of the *termios* structure.

- **TIOCSSOFTCAR**

  ("Set software carrier flag") Set the CLOCAL flag in the *termios* structure when \**argp* is nonzero, and clear it otherwise.

If the **CLOCAL** flag for a line is off, the hardware carrier detect (DCD) signal is significant, and an [**open**(2)](/open/2.md) of the corresponding terminal will block until DCD is asserted, unless the **O\_NONBLOCK** flag is given. If **CLOCAL** is set, the line behaves as if DCD is always asserted. The software carrier flag is usually turned on for local devices, and is off for lines with modems.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md), [**ioctl\_tty**(2)](/ioctl_tty/2.md)
