How to use Pipes in C and Linux

  Рет қаралды 1,061

Gregg Ink

Gregg Ink

Күн бұрын

Пікірлер: 7
@jagadeeshanms2863
@jagadeeshanms2863 3 жыл бұрын
your videos are great, i am watching all your videos♡
@GreggInkCodes
@GreggInkCodes 3 жыл бұрын
Awesome
@wshorrock
@wshorrock 3 жыл бұрын
Great Video
@GreggInkCodes
@GreggInkCodes 3 жыл бұрын
You are welcome :)
@NOPerative
@NOPerative Жыл бұрын
Awesome fella!
@weeb3277
@weeb3277 3 жыл бұрын
Do you ever plan to do a video dedicated to stdin, stdout and stderr? You did mention them in your "How to create your own linux command?" video. But it was kinda brief and would be nice to see how errors fire from within a language. Plus it's easier to share a stand alone video, no need to timestamp.
@GreggInkCodes
@GreggInkCodes 3 жыл бұрын
The problem is: I don't think there is enough to say for an entire video. When you start a program, 3 file descriptors are automatically available as provided by the kernel. File descriptors are defined by a number, thus you have 0 (stdin), 1 (stdout) and 2 (stderr). If you decide to open a file on your drive, the file descriptor for that file will be the next number, i.e. 3. Those file descriptors can be accessed with syscalls read() and write() or with glibc wrappers like fread, fwrite, fprintf, etc. Macros are defined in stdio.h (or a file it includes) because humans prefer typing 'stdin' rather than the number 0. I am not sure what you mean with an error 'firing within a language'. The C language is not responsible for errors produced at run-time and errors at compile time are generated by the compiler. If you do get an error in your code at run time, there is a high chance it was produced inside glibc by writing to stderr. You can generate your own errors within your code by writing fprintf( stderr, "Here is some error."); I hope that clarifies things enough for you. Let me know if there is anything else.
How to run a program from within a program in C & Linux
17:17
小路飞和小丑也太帅了#家庭#搞笑 #funny #小丑 #cosplay
00:13
家庭搞笑日记
Рет қаралды 9 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 51 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 110 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 13 МЛН
Sockets and Pipes Look Like Files (Unix/fdopen)
12:45
Jacob Sorber
Рет қаралды 21 М.
Two way communication between processes (using pipes) in C
18:16
Understanding text for C Programmers (UTF-8, Unicode, ASCII)
14:36
Communicating between processes (using pipes) in C
14:00
CodeVault
Рет қаралды 287 М.
Web programming (CGI) in C
25:27
Gregg Ink
Рет қаралды 25 М.
Pipes and Named Pipes in C
16:12
Eric O Meehan
Рет қаралды 4,6 М.
The Value of Source Code
17:46
Philomatics
Рет қаралды 207 М.
I wrote my own JSON parser. Also, JSON is a terrible standard.
28:54
37.2 - Pipes
12:14
Kris Jordan
Рет қаралды 4,5 М.
小路飞和小丑也太帅了#家庭#搞笑 #funny #小丑 #cosplay
00:13
家庭搞笑日记
Рет қаралды 9 МЛН