-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpts.cpp
More file actions
39 lines (32 loc) · 735 Bytes
/
pts.cpp
File metadata and controls
39 lines (32 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* =====================================================================================
*
* Filename: pts.cpp
*
* Description:
*
* Version: 1.0
* Created: 09/22/2017 08:47:43 AM
* Last Modified: 2020-12-26 14:57:19
* Revision: none
* Compiler: gcc
*
* Author: zt (),
* Organization:
*
* =====================================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/fcntl.h>
int main ( int argc, char* argv[] )
{
( void ) argc;
( void ) argv;
int fd = open ( "/dev/pts/0", O_RDWR );
write ( fd, "test!!!", 6 );
close ( fd );
return 0;
}