{"id":4149,"date":"2024-04-27T10:29:28","date_gmt":"2024-04-27T04:59:28","guid":{"rendered":"https:\/\/cthecosmos.com\/?p=4149"},"modified":"2024-04-27T10:29:56","modified_gmt":"2024-04-27T04:59:56","slug":"%f0%9d%91%ab%f0%9d%92%8a%f0%9d%92%97%f0%9d%92%8a%f0%9d%92%8f%f0%9d%92%88-%f0%9d%92%8a%f0%9d%92%8f%f0%9d%92%95%f0%9d%92%90-%f0%9d%91%bc%f0%9d%92%8f%f0%9d%92%8a%f0%9d%92%99-%f0%9d%91%b7%f0%9d%92%8a","status":"publish","type":"post","link":"https:\/\/cthecosmos.com\/?p=4149","title":{"rendered":"\ud835\udc6b\ud835\udc8a\ud835\udc97\ud835\udc8a\ud835\udc8f\ud835\udc88 \ud835\udc8a\ud835\udc8f\ud835\udc95\ud835\udc90 \ud835\udc7c\ud835\udc8f\ud835\udc8a\ud835\udc99 \ud835\udc77\ud835\udc8a\ud835\udc91\ud835\udc86\ud835\udc94: \ud835\udc68 \ud835\udc6d\ud835\udc96\ud835\udc8f \ud835\udc71\ud835\udc90\ud835\udc96\ud835\udc93\ud835\udc8f\ud835\udc86\ud835\udc9a \ud83d\ude80"},"content":{"rendered":"\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-8c6400239a2a951777389da9040c4690 wp-block-paragraph\" style=\"font-size:17px;line-height:1.8\">Ever heard of Unix Pipes? They&#8217;re among the OGs of Inter-Process Communication (IPC) on Unix systems. But let&#8217;s break things down a bit.<br><br>\ud83d\udd0d \ud835\udc6a\ud835\udc90\ud835\udc8e\ud835\udc8e\ud835\udc82\ud835\udc8f\ud835\udc85 \ud835\udc69\ud835\udc93\ud835\udc86\ud835\udc82\ud835\udc8c\ud835\udc85\ud835\udc90\ud835\udc98\ud835\udc8f:\u00a0Ever tried the command \u00a0\ud835\udc8d\ud835\udc94 | \ud835\udc98\ud835\udc84 -\ud835\udc8d? Wonder what&#8217;s happening?<br><br>The shell gets to work, initiating two processes: \u00a0\ud835\udc8d\ud835\udc94 lists files, and \ud835\udc98\ud835\udc84 counts them.<br><br>Our buddies \ud835\udc87\ud835\udc90\ud835\udc93\ud835\udc8c() and \ud835\udc86\ud835\udc99\ud835\udc86\ud835\udc84() make this magic happen.<br><br>\ud83c\udf1f The Real MVP &#8211; Pipes: They&#8217;re the unsung heroes ensuring data flows seamlessly between processes.<br><br>\ud835\udc72\ud835\udc86\ud835\udc9a \ud835\udc70\ud835\udc8f\ud835\udc94\ud835\udc8a\ud835\udc88\ud835\udc89\ud835\udc95\ud835\udc94 \ud835\udc90\ud835\udc8f \ud835\udc77\ud835\udc8a\ud835\udc91\ud835\udc86\ud835\udc94:<br><br>\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66 Family Affairs: Pipes are like family messengers, primarily connecting parent and child processes. And guess who can join the party? Yep, grandparents and even great-grandparents, as long as there&#8217;s a shared ancestor who began the conversation.<br><br>\ud83c\udfb5 Stream Like Spotify: Pipes work like your music streaming. It&#8217;s a continuous flow, no skips, no jumps. Pure, uninterrupted data stream.<br><br>\ud83d\udeab One-Way Traffic: Imagine a one-lane road. That&#8217;s how pipes function. They have a one-way data flow. And oh, there&#8217;s a capacity cap (often around 65,536 bytes, a typical limit on most of the systems). When it&#8217;s jam-packed, someone&#8217;s gotta wait!<br><br>\ud835\udc78\ud835\udc96\ud835\udc8a\ud835\udc84\ud835\udc8c \ud835\udc6f\ud835\udc82\ud835\udc8f\ud835\udc85\ud835\udc94-\ud835\udc76\ud835\udc8f:<br><br>&#8211; Ring up pipe() and voila! You get two numbers: \ud835\udc91\ud835\udc8a\ud835\udc91\ud835\udc86\ud835\udc87\ud835\udc85[\ud835\udfce]\u00a0 for reading and \ud835\udc91\ud835\udc8a\ud835\udc91\ud835\udc86\ud835\udc87\ud835\udc85[\ud835\udfcf] for writing.<br><br>&#8211; Jot down a message and instantly, it&#8217;s available for any reader out there.<br><br>&#8211; Wanna share notes between two pals (processes)? Dial \ud835\udc91\ud835\udc8a\ud835\udc91\ud835\udc86(), followed by \ud835\udc87\ud835\udc90\ud835\udc93\ud835\udc8c(). The kiddo (child process) inherits the same numbers.<br><br>&#8211; Pro Tip: Keep it neat. Parents should stick to sending (close the reading), and kids? They&#8217;re all ears (close the writing).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"725\" data-attachment-id=\"4152\" data-permalink=\"https:\/\/cthecosmos.com\/?attachment_id=4152\" data-orig-file=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponpipe3_readable-1.png?fit=8347%2C6048&amp;ssl=1\" data-orig-size=\"8347,6048\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ponpipe3_readable-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponpipe3_readable-1.png?fit=1000%2C725&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponpipe3_readable-1.png?resize=1000%2C725&#038;ssl=1\" alt=\"\" class=\"wp-image-4152\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-e5f5d288ee9d54d8dc9d236d51ee7589 wp-block-paragraph\" style=\"font-size:17px\">LinkedIn Post: <a href=\"https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_earlycareer-embeddedsystems-learning-activity-7106490066964803584-ReNG\/?utm_source=share&amp;utm_medium=member_desktop\">https:\/\/www.linkedin.com\/posts\/t-yashwanth-naidu_earlycareer-embeddedsystems-learning-activity-7106490066964803584-ReNG\/?utm_source=share&amp;utm_medium=member_desktop<\/a><\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background has-link-color has-medium-font-size wp-elements-486e7799b35920eece0029316d5e98bd wp-block-paragraph\" style=\"background:linear-gradient(135deg,rgb(35,23,11) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)\">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><strong>An Article by: <\/strong>Yashwanth Naidu Tikkisetty<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unix Pipes are the OGs of Inter-Process Communication on Unix systems. They facilitate seamless data flow between processes, like family messengers connecting parent and child processes. Operating like a one-lane road, they ensure a one-way data flow with a capacity limit. With simple functions, they enable sharing of notes between processes.<\/p>\n<a href=\"https:\/\/cthecosmos.com\/?p=4149\" class=\"more-link\">Read More <span class=\"screen-reader-text\">\ud835\udc6b\ud835\udc8a\ud835\udc97\ud835\udc8a\ud835\udc8f\ud835\udc88 \ud835\udc8a\ud835\udc8f\ud835\udc95\ud835\udc90 \ud835\udc7c\ud835\udc8f\ud835\udc8a\ud835\udc99 \ud835\udc77\ud835\udc8a\ud835\udc91\ud835\udc86\ud835\udc94: \ud835\udc68 \ud835\udc6d\ud835\udc96\ud835\udc8f \ud835\udc71\ud835\udc90\ud835\udc96\ud835\udc93\ud835\udc8f\ud835\udc86\ud835\udc9a \ud83d\ude80<\/span><\/a>","protected":false},"author":120055267,"featured_media":4151,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[36985,28627,30181,35264203,769114260],"tags":[772321195,772321193,371637,12281096,88204,771201861,79812,1354040],"class_list":["post-4149","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","category-embedded","category-embedded-systems","category-linux-3","category-linuxlearnings","tag-c-programming","tag-embedded-systems","tag-ipc","tag-ipc-mechanism","tag-linux-fun","tag-linuxlearning-2","tag-pipes","tag-short-article","fallback-thumbnail"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cthecosmos.com\/wp-content\/uploads\/2024\/04\/ponpipe3_readable.png?fit=8347%2C6048&ssl=1","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8CiEf-14V","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/users\/120055267"}],"replies":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4149"}],"version-history":[{"count":5,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4149\/revisions"}],"predecessor-version":[{"id":4156,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/posts\/4149\/revisions\/4156"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=\/wp\/v2\/media\/4151"}],"wp:attachment":[{"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cthecosmos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}