Skip to content

brownjava/send_fd_over_unix_domain_socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sending a socket over a UNIX domain socket

This is a quickly-throw-together reference implementation of how to send a socket over a UNIX domain socket. I threw this together pieced together from snippets of code online and looking at man page references because I wanted to understand how it worked, as it's similar to the basic way that isolating access to system resources works on many platforms (including macOS).

The makefile here generates two processes: client and server. Run the server first. Then run the client. The server sends its standard output file descriptor to the client, then closes the connection to the client. The client receives this and then reads from standard input and writes to this, causing the text to appear in the standard output of the server (probably a pseudo terminal of some sort).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published