Knowledge

Named pipe

Source 📝

227:
Named pipes cannot be created as files within a normal filesystem, unlike in Unix. Also unlike their Unix counterparts, named pipes are volatile (removed after the last reference to them is closed). Every pipe is placed in the root directory of the named pipe filesystem (NPFS), mounted under the
126:
A named pipe can be used to transfer information from one application to another without the use of an intermediate temporary file. For example, you can pipe the output of gzip into a named pipe like so (here out.gz is from above example but it can be any gz):
72:" and lasts only as long as the process. A named pipe, however, can last as long as the system is up, beyond the life of the process. It can be deleted if no longer used. Usually a named pipe appears as a file, and generally processes attach to it for IPC. 554: 174:
Without this named pipe one would need to write out the entire uncompressed version of file.gz before loading it into MySQL. Writing the temporary file is both time-consuming and results in more
270:
supports named pipes as a transport for debugging sessions (in fact, VMware and WinDbg can be coupled together – as WinDbg normally requires a serial connection to the target computer – letting
620: 507: 546: 374:(IPC) share. SMB's IPC can seamlessly and transparently pass the authentication context of the user across to Named Pipes. Windows NT's entire 753: 613: 473: 809: 873: 606: 768: 320: 315: 301: 297: 40: 495: 773: 277:
do their development and testing on a single computer). Both programs require the user to enter names in the
629: 582: 532: 421: 371: 57: 17: 443: 748: 763: 96:
can access the pipe by name — one process can open it as a reader, and the other as a writer.
695: 345:
Inefficient WAN traffic (explicit data transfer request, unlike e.g. TCP/IP sliding window, etc.)
730: 217: 528: 396: 367: 360: 8: 824: 461: 93: 829: 735: 718: 642: 274: 244: 114:
In a separate process shell, independently, one could send the data to be compressed:
80:
Instead of a conventional, unnamed, shell pipeline, a named pipeline makes use of the
247: 65: 216:
open, read from, write to, and close a pipe, respectively. Unlike Unix, there is no
646: 240:). Anonymous pipes used in pipelining are actually named pipes with a random name. 690: 670: 401: 310: 251: 45: 713: 685: 429: 391: 382:
service over Named Pipes, as are the Exchange 5.5 Administrative applications.
353: 69: 598: 867: 804: 700: 675: 660: 592: 306: 271: 705: 588: 578: 175: 243:
They are very rarely seen by users, but there are notable exceptions. The
743: 255: 197: 547:"How to connect to SQL Server by using an earlier version of SQL Server" 852: 778: 503: 221: 181: 81: 68:, although the semantics differ substantially. A traditional pipe is " 550: 375: 339: 267: 53: 31: 842: 263: 814: 783: 379: 444:"mknod, mknodat - make directory, special file, or regular file" 348:
Peekable reads (read without removing from pipe's input buffer)
259: 847: 837: 788: 758: 469: 140: 799: 794: 665: 638: 100: 61: 49: 233: 287:
Windows NT named pipes can inherit a security context.
44:
for its behavior) is an extension to the traditional
366:Named pipes are also a networking protocol in the 325:Blocking or Nonblocking read and write (choosable) 135:/tmp/namedPipe gzip-d<out.gz>/tmp/namedPipe 120:The named pipe can be deleted just like any file: 865: 628: 359:Named pipes can also be used as an endpoint in 196:A named pipe can be accessed much like a file. 188:, also supports loading data from named pipes. 579:Linux Interprocess Communications: Named Pipes 378:protocol suite of services are implemented as 99:For example, one can create a pipe and set up 614: 493: 422:"mkfifo, mkfifoat - make a FIFO special file" 290:Summary of named pipes on Microsoft Windows: 370:(SMB) suite, based on the use of a special 258:to the host system as named pipes, and the 107:mkfifomy_pipe gzip-9-c<my_pipe>out.gz 621: 607: 254:tool, for instance, can expose emulated 454: 178:and less free space on the hard drive. 139:Then load the uncompressed data into a 14: 866: 56:systems, and is one of the methods of 602: 27:Method of inter-process communication 60:(IPC). The concept is also found in 24: 356:3.5 has added named pipe support. 25: 885: 572: 321:Connection-oriented communication 294:Intermachine and intramachine IPC 236:" would have a full path name of 84:. It is explicitly created using 103:to compress things piped to it: 557:from the original on 2020-07-20 510:from the original on 2022-05-20 476:from the original on 2020-06-14 539: 521: 487: 436: 414: 13: 1: 407: 328:Standard device I/O handles ( 191: 494:Aidan Van Dyk (2008-03-27). 462:"13.2.7 LOAD DATA Statement" 7: 874:Inter-process communication 630:Inter-process communication 589:Introduction to Named Pipes 583:Linux Documentation Project 533:Microsoft Developer Network 529:"System.IO.Pipes Namespace" 385: 372:inter-process communication 58:inter-process communication 10: 890: 496:"Re: psql and named pipes" 466:MySQL 8.0 Reference Manual 75: 823: 729: 676:Message queue and mailbox 653: 636: 184:'s command line utility, 232:(that is, a pipe named " 157:'/tmp/namedPipe' 145: 129: 105: 342:used to create handles 218:command line interface 117:cat file > my_pipe 448:IEEE Std 1003.1-2017 426:IEEE Std 1003.1-2017 397:Anonymous named pipe 368:Server Message Block 361:Microsoft SQL Server 92:, and two separate 825:Software libraries 666:Memory-mapped file 245:VMware Workstation 861: 860: 791:(various methods) 647:computer programs 450:. The Open Group. 66:Microsoft Windows 38:(also known as a 16:(Redirected from 881: 623: 616: 609: 600: 599: 566: 565: 563: 562: 543: 537: 536: 525: 519: 518: 516: 515: 491: 485: 484: 482: 481: 458: 452: 451: 440: 434: 433: 418: 335: 331: 283: 239: 231: 215: 211: 207: 203: 187: 170: 167: 164: 161: 158: 155: 152: 149: 134: 110: 91: 87: 21: 889: 888: 884: 883: 882: 880: 879: 878: 864: 863: 862: 857: 827: 819: 733: 725: 671:Message passing 649: 641:exchange among 632: 627: 575: 570: 569: 560: 558: 545: 544: 540: 527: 526: 522: 513: 511: 492: 488: 479: 477: 460: 459: 455: 442: 441: 437: 420: 419: 415: 410: 402:Unix file types 388: 333: 329: 311:packet-oriented 278: 237: 229: 213: 209: 205: 201: 194: 185: 172: 171: 168: 165: 162: 159: 156: 153: 150: 147: 143:table like so: 137: 136: 132: 124: 118: 112: 111: 108: 89: 85: 78: 28: 23: 22: 15: 12: 11: 5: 887: 877: 876: 859: 858: 856: 855: 850: 845: 840: 834: 832: 821: 820: 818: 817: 812: 807: 802: 797: 792: 786: 781: 776: 771: 766: 761: 756: 751: 746: 740: 738: 727: 726: 724: 723: 722: 721: 716: 708: 703: 698: 693: 688: 686:Anonymous pipe 683: 678: 673: 668: 663: 657: 655: 651: 650: 637: 634: 633: 626: 625: 618: 611: 603: 597: 596: 586: 574: 573:External links 571: 568: 567: 553:. 2019-11-19. 538: 520: 486: 453: 435: 430:The Open Group 412: 411: 409: 406: 405: 404: 399: 394: 392:Anonymous pipe 387: 384: 354:.NET Framework 350: 349: 346: 343: 337: 326: 323: 318: 313: 304: 295: 252:virtualization 200:SDK functions 193: 190: 146: 130: 122: 116: 106: 77: 74: 26: 9: 6: 4: 3: 2: 886: 875: 872: 871: 869: 854: 851: 849: 846: 844: 841: 839: 836: 835: 833: 831: 826: 822: 816: 813: 811: 808: 806: 803: 801: 798: 796: 793: 790: 787: 785: 782: 780: 777: 775: 772: 770: 767: 765: 762: 760: 757: 755: 752: 750: 747: 745: 742: 741: 739: 737: 732: 728: 720: 717: 715: 712: 711: 709: 707: 704: 702: 701:Shared memory 699: 697: 694: 692: 689: 687: 684: 682: 679: 677: 674: 672: 669: 667: 664: 662: 659: 658: 656: 652: 648: 644: 640: 635: 631: 624: 619: 617: 612: 610: 605: 604: 601: 594: 593:Linux Journal 590: 587: 584: 580: 577: 576: 556: 552: 548: 542: 534: 530: 524: 509: 505: 501: 500:pgsql-hackers 497: 490: 475: 471: 467: 463: 457: 449: 445: 439: 431: 427: 423: 417: 413: 403: 400: 398: 395: 393: 390: 389: 383: 381: 377: 373: 369: 364: 362: 357: 355: 347: 344: 341: 338: 327: 324: 322: 319: 317: 314: 312: 308: 307:Byte-oriented 305: 303: 299: 296: 293: 292: 291: 288: 285: 282: 276: 273: 269: 265: 261: 257: 253: 249: 246: 241: 235: 228:special path 225: 223: 220:, except for 219: 199: 189: 183: 179: 177: 144: 142: 128: 121: 115: 104: 102: 97: 95: 83: 73: 71: 67: 63: 59: 55: 51: 47: 43: 42: 37: 33: 19: 744:Apple events 680: 559:. Retrieved 541: 523: 512:. Retrieved 499: 489: 478:. Retrieved 465: 456: 447: 438: 425: 416: 365: 358: 351: 289: 286: 280: 262:kernel mode 256:serial ports 242: 238:\\.\pipe\foo 226: 195: 180: 173: 138: 125: 119: 113: 98: 79: 39: 35: 29: 302:full-duplex 298:Half-duplex 214:CloseHandle 123:rm my_pipe 48:concept on 18:Named pipes 830:frameworks 779:OpenBinder 681:Named pipe 561:2020-05-19 514:2020-05-19 504:PostgreSQL 480:2020-05-19 408:References 275:developers 222:PowerShell 202:CreateFile 192:In Windows 182:PostgreSQL 82:filesystem 36:named pipe 736:standards 731:Protocols 696:Semaphore 551:Microsoft 376:NT Domain 340:Namespace 334:WriteFile 279:\\.\pipe\ 268:Microsoft 250:hardware 230:\\.\pipe\ 210:WriteFile 166:tableName 94:processes 54:Unix-like 32:computing 868:Category 843:libevent 710:Sockets 555:Archived 508:Archived 474:Archived 386:See also 330:ReadFile 316:Reliable 264:debugger 206:ReadFile 131:mkfifo-m 86:mkfifo() 815:XML-RPC 784:Sun RPC 714:Network 654:Methods 643:threads 595:, 1997) 585:, 1996) 380:DCE/RPC 90:mknod() 76:In Unix 70:unnamed 805:Thrift 706:Signal 284:form. 272:driver 260:WinDbg 154:INFILE 848:SIMPL 838:D-Bus 789:POSIX 759:D-Bus 754:CORBA 470:MySQL 266:from 198:Win32 163:TABLE 141:MySQL 109:& 853:LINX 828:and 810:TIPC 800:REST 795:SOAP 749:COM+ 734:and 719:Unix 691:Pipe 661:File 639:Data 352:The 281:name 212:and 186:psql 160:INTO 151:DATA 148:LOAD 133:0666 101:gzip 64:and 62:OS/2 52:and 50:Unix 46:pipe 41:FIFO 34:, a 774:ICE 769:DCE 764:DDS 645:in 309:or 300:or 234:foo 176:I/O 88:or 30:In 870:: 549:. 531:. 506:. 502:. 498:. 472:. 468:. 464:. 446:. 428:. 424:. 363:. 332:, 248:PC 224:. 208:, 204:, 622:e 615:t 608:v 591:( 581:( 564:. 535:. 517:. 483:. 432:. 336:) 169:; 20:)

Index

Named pipes
computing
FIFO
pipe
Unix
Unix-like
inter-process communication
OS/2
Microsoft Windows
unnamed
filesystem
processes
gzip
MySQL
I/O
PostgreSQL
Win32
command line interface
PowerShell
foo
VMware Workstation
PC
virtualization
serial ports
WinDbg
debugger
Microsoft
driver
developers
Half-duplex

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.