Sponsored Content
Full Discussion: System programming in C
Top Forums Programming System programming in C Post 26003 by killerserv on Friday 9th of August 2002 03:31:49 AM
Old 08-09-2002
This example is a terminal handler in C sys level programming, it uses ioctl() subroutine.
Code:
#include &ltstdio.h>
#include &ltsgtty.h>
/* for Solaris Compilation */
#include &ltsys/termios.h>

struct ltchars old, new;
main()
{
  fprintf(stdout, "ORIGINAL TERMINAL ATTRIBUTES:-\n");
  system("stty all");
 
  ioctl(0,TIOCGLTC,&old); ioctl(0,TIOCGLTC,&new);       
  new.t_suspc='\033'; ioctl(0, TIOCSLTC, &new);        
  fprintf(stdout, "\n\nMODIFIED TERMINAL ATTRIBUTES:-\n");
  system("stty all");
  ioctl(0, TIOCSLTC, &old);                             
}

You can check this as an Example.
 

10 More Discussions You Might Find Interesting

1. Programming

System Programming

Hi all, I am working on a c program (in a unix environment) making system calls. My program makes references to POSIX, _POSIX_SOURCE 1. When trying to compile the c program, I received a message "Language optional software package not installed." I am not sure if this message refers to... (3 Replies)
Discussion started by: rachael
3 Replies

2. Programming

unix system programming

hey there i have to execute commands that are written on the command line in unix. i have already separated the commands into tokens but now im stuck with the problem of how to actually execute those commands. eg: lets say the user entered " ls -l" to list all the files in a directory ... (1 Reply)
Discussion started by: mile1982
1 Replies

3. Programming

System programming book

please tell me the best book for Unix's System programming..... so that i become expert in System programming.I have completed shell programming and i know C programming in Unix. please tell me which book i should prefer... -ajit (1 Reply)
Discussion started by: ajit_gupta
1 Replies

4. Programming

system Programming using JAVA.

Dear Sir, How to write Code using JAVA technology for system programming ? I want to develop a new compiler for my own language. thanks in advance roy (1 Reply)
Discussion started by: swapan
1 Replies

5. Programming

System programming in C

Hi guys, i'm programming in C for Linux but i preferred to program in FreeBSD and some FreeBSD system calls are not available in Linux and i want to make my code portable but i don't now really how, but i think if i used some C preprocessors i can make it portable, and the problems is that i don't... (8 Replies)
Discussion started by: pharaoh
8 Replies

6. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

7. Programming

What is Unix System Programming???

Hi friends, Hope u r doing well. I really find the phrase, "Unix System Programming" very very cool, I don't know the reason, but it since I love UNIX, I want to do system programming in unix. Could you please tell me what is really the meaning of unix system programming. I have a couple of books... (5 Replies)
Discussion started by: gabam
5 Replies

8. Programming

c programming system call

newPerm = oldPerm & ~0100; where oldPerm holds the value of st_mode from the system call stat(). When I try and compile every line where ive attempted to do these operations gives the warning "parameter names without declaration types in function declaration". what could be the problem? the... (2 Replies)
Discussion started by: bjhum33
2 Replies

9. Shell Programming and Scripting

System programming with Unix

Hi All I want to learn System programming with the help of Unix. System Programming mean to say 1) Playing with the memory of computer 2) Designing some graphical units Hope you understand... (2 Replies)
Discussion started by: parthmittal2007
2 Replies

10. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
TERMIO(7)                                                    Linux Programmer's Manual                                                   TERMIO(7)

NAME
termio - System V terminal driver interface DESCRIPTION
termio is the name of the old System V terminal driver interface. This interface defined a termio structure used to store terminal set- tings, and a range of ioctl(2) operations to get and set terminal attributes. The termio interface is now obsolete: POSIX.1-1990 standardized a modified version of this interface, under the name termios. The POSIX.1 data structure differs slightly from the System V version, and POSIX.1 defined a suite of functions to replace the various ioctl(2) opera- tions that existed in System V. (This was done because ioctl(2) was unstandardized, and its variadic third argument does not allow argu- ment type checking.) If you're looking for a page called "termio", then you can probably find most of the information that you seek in either termios(3) or ioctl_tty(2). SEE ALSO
reset(1), setterm(1), stty(1), ioctl_tty(2), termios(3), tty(4) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-05-03 TERMIO(7)
All times are GMT -4. The time now is 02:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy